[ 
https://issues.apache.org/jira/browse/JCR-3777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14009478#comment-14009478
 ] 

angela commented on JCR-3777:
-----------------------------

and then there is a bug in the javadoc: it states that the 'principalName' is 
the 'id' of a group or user. this is not correct as the authorizable ID and the 
principal name associated with that authorizable can be different!

> Add simple allow/deny/clear convenience methods to AccessControlUtils
> ---------------------------------------------------------------------
>
>                 Key: JCR-3777
>                 URL: https://issues.apache.org/jira/browse/JCR-3777
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-jcr-commons
>            Reporter: Alexander Klimetschek
>            Assignee: Alexander Klimetschek
>            Priority: Minor
>         Attachments: JCR-3777.patch
>
>
> Add these short convenience methods:
> {code}
> AccessControlUtils.clear(node, "user");
> AccessControlUtils.allow(node, "user", Privilege.JCR_READ, 
> Privilege.JCR_WRITE);
> AccessControlUtils.deny(node, "user", Privilege.JCR_REMOVE_NODE);
> AccessControlUtils.clear(node); // remove all entries for all users
> {code}
> Useful for unit tests or other places where you need to set ACLs from code. 
> Uses varargs for the privilege list, and uses the first argument node for 
> both the path and the session to use.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to