Angela Schreiber created SLING-11245:
----------------------------------------
Summary: AclUtil.removePolicies(Session, List<String> paths) will
fail if no policy exists
Key: SLING-11245
URL: https://issues.apache.org/jira/browse/SLING-11245
Project: Sling
Issue Type: Bug
Components: Repoinit
Affects Versions: Repoinit JCR 1.1.38
Reporter: Angela Schreiber
Fix For: Repoinit JCR 1.1.40
while using
{code}
"delete ACL on /some/path"
{code}
i noticed that it will fail if there is no policy to remove.
the reason for this is the usage of
{code}
AccessControlUtils.getAccessControlList(session, jcrPath);
{code}
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
{code}
getAccessControlList(@NotNull JackrabbitAccessControlManager acMgr,
@Nullable String path, boolean
includeApplicable)
{code}
that does not retrieve applicable policies in case of 'includeApplicable' is
false.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)