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