ACL check was broken, addToEveryAction should come first (#204)

This commit is contained in:
James Read 2023-12-21 00:07:40 +00:00 committed by GitHub
parent c15449f99a
commit b0faecfa75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -111,11 +111,11 @@ func buildUserAcls(cfg *config.Config, user *AuthenticatedUser) {
}
func isACLRelevant(cfg *config.Config, actionAcls []string, acl config.AccessControlList, user *AuthenticatedUser) bool {
if !slices.Contains(user.acls, acl.Name) {
return false
if acl.AddToEveryAction {
return true
}
if acl.AddToEveryAction {
if slices.Contains(user.acls, acl.Name) {
return true
}