anchela commented on a change in pull request #14:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/14#discussion_r610382944



##########
File path: src/main/java/org/apache/sling/jcr/repoinit/impl/AclUtil.java
##########
@@ -203,6 +203,7 @@ public static void setPrincipalAcl(Session session, String 
principalName, Collec
         }
 
         final PrincipalAccessControlList acl = 
getPrincipalAccessControlList(acMgr, principal);
+        checkState(acl != null, "No PrincipalAccessControlList available for 
principal '" + principal + "'."); 

Review comment:
       @kwin , {{Principal}} just has a name.... but there exists an extension 
in _jackrabbit-api_ named 
{{org.apache.jackrabbit.api.security.principal.ItemBasedPrincipal}} that has a 
{{getPath()}} method. but principals exposed by {{PrincipalManager}} are not 
required to be of that type. if there exists a principal source (represented by 
a PrincipalProvider that contains principals not tied to a dedicated JCR item, 
they might just be simple {{Principal}}s. see _oak-exercise_ module and 
{{ExternalGroupPrincipal}} in _oak-auth-external_ for examples.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to