jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "angela (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JCR-3350) Easy-to-use utility class for adding ACEs to nodes
Date Wed, 18 Jul 2012 08:55:34 GMT

     [ https://issues.apache.org/jira/browse/JCR-3350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

angela updated JCR-3350:
------------------------

       Resolution: Fixed
    Fix Version/s: 2.5.1
           Status: Resolved  (was: Patch Available)

i slightly refactored the patch and committed it at revision 1362813.

the utility now provides the following methods:
- privilegesFromNames: to get privilege instances from the name (constants)
- getAccessControlList: to retrieve a modifiable JackrabbitAccessControlList
- addAccessControlEntry: to grant/deny privileges to a given principal at a given path
- grantAllToEveryone: grant jcr:all to the everyone group principal
- denyAllToEveryone: deny jcr:all to the everyone group principal

all methods throw RepositoryException and none of the method persists any changes made.
javadoc of the modifying methods explains that Session#save() is required in order to persist

the modifications.

as felix stated the Session#itemExists call is rather confusing and doesn't add any value
IMO.
i therefore omitted it altogether and adjusted javadoc: the path parameter is called absPath
and
is defined to be a absolute path of an existing node. In case of an invalid path the method
with
throw the appropriate exception such as defined by the JCR access control API.
                
> Easy-to-use utility class for adding ACEs to nodes
> --------------------------------------------------
>
>                 Key: JCR-3350
>                 URL: https://issues.apache.org/jira/browse/JCR-3350
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-jcr-commons
>            Reporter: Jeff Young
>            Assignee: angela
>              Labels: newbie, patch
>             Fix For: 2.5.1
>
>         Attachments: AccessControlUtils.java, JCR-3350_-_Easy-to-use_utility_class_for_adding_ACEs_to_nodes.patch
>
>
> There should be any easy (one-line) method for adding an ACE to a node in a repo supporting
resource-based ACLs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message