From e8dd753a622fcd68edca85a71fecba3395f7aa2b Mon Sep 17 00:00:00 2001 From: Pablo Castelo Date: Fri, 29 Sep 2023 14:16:59 +0200 Subject: [PATCH] Adding a new condition to identify when a everyone deny is found and if that is the case, all configured acls on the node are removed and installed again --- .../AceBeanInstallerIncremental.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/accesscontroltool-bundle/src/main/java/biz/netcentric/cq/tools/actool/aceinstaller/AceBeanInstallerIncremental.java b/accesscontroltool-bundle/src/main/java/biz/netcentric/cq/tools/actool/aceinstaller/AceBeanInstallerIncremental.java index 19d5be9a..f8dadc66 100644 --- a/accesscontroltool-bundle/src/main/java/biz/netcentric/cq/tools/actool/aceinstaller/AceBeanInstallerIncremental.java +++ b/accesscontroltool-bundle/src/main/java/biz/netcentric/cq/tools/actool/aceinstaller/AceBeanInstallerIncremental.java @@ -82,7 +82,8 @@ protected void installAcl(Set aceBeanSetFromConfig, String path, Set aceBeanSetFromConfig, String path, Set aceBeanSetFromConfig, String path, Set items = Arrays.asList(acl.getAccessControlEntries()).iterator(); + while (items.hasNext()) { + AccessControlEntry currentEntry = items.next(); + if (principalsInConfiguration.contains(currentEntry.getPrincipal().getName())) { + acl.removeAccessControlEntry(currentEntry); + } + } + currentPositionConfig = 0; + } + // install missing - this can be either because not all configured ACEs were found (append) or because a change was detected and old // aces have been deleted