From b0faecfa75f812ee50183ea35ca98bcb80b331d8 Mon Sep 17 00:00:00 2001 From: James Read Date: Thu, 21 Dec 2023 00:07:40 +0000 Subject: [PATCH] ACL check was broken, addToEveryAction should come first (#204) --- internal/acl/acl.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/acl/acl.go b/internal/acl/acl.go index 979d37b..c322330 100644 --- a/internal/acl/acl.go +++ b/internal/acl/acl.go @@ -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 }