mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-13 17:45:36 +00:00
Revert "ACL check was broken, addToEveryAction should come first (#204)"
This reverts commit b0faecfa75.
This commit is contained in:
@@ -111,11 +111,11 @@ func buildUserAcls(cfg *config.Config, user *AuthenticatedUser) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func isACLRelevant(cfg *config.Config, actionAcls []string, acl config.AccessControlList, user *AuthenticatedUser) bool {
|
func isACLRelevant(cfg *config.Config, actionAcls []string, acl config.AccessControlList, user *AuthenticatedUser) bool {
|
||||||
if acl.AddToEveryAction {
|
if !slices.Contains(user.acls, acl.Name) {
|
||||||
return true
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if slices.Contains(user.acls, acl.Name) {
|
if acl.AddToEveryAction {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user