fix(licenses): bypass attachment perm check for licensed downloads #426

Merged
jmiller merged 1 commits from dev into main 2026-06-02 15:17:45 +00:00
+5 -2
View File
@@ -182,8 +182,11 @@ func ServeAttachment(ctx *context.Context, uuid string) {
}
if !perm.CanRead(unitType) {
ctx.HTTPError(http.StatusNotFound)
return
// Allow access for licensed read-only mode (private repo with valid license key).
if ctx.Data["LicensedReadOnly"] != true {
ctx.HTTPError(http.StatusNotFound)
return
}
}
if requiredScope, ok := attachmentReadScope(unitType); ok {