fix(licenses): bypass attachment perm check for licensed downloads #426
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user