Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Repoinit JCR 1.1.38
-
None
Description
while using
"delete ACL on /some/path"
i noticed that it will fail if there is no policy to remove.
the reason for this is the usage of
AccessControlUtils.getAccessControlList(session, jcrPath);
which may return an applicable policy if no policy exists yet at the given path.
however, a new applicable policy cannot be removed.
note that the other variants to delete a policy are not affected because they only retrieve existing policies.
in order to fix that usage of AccessControlUtils.getAccessControlList(session, jcrPath) should be replaced by a local utility method
getAccessControlList(@NotNull JackrabbitAccessControlManager acMgr, @Nullable String path, boolean includeApplicable)
that does not retrieve applicable policies in case of 'includeApplicable' is false.