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

Justin Edelson closed SLING-1453.
---------------------------------


> Provide AuthorizablePrivilegesInfo service to help user/group management 
> scripts query what the current user is allowed to do
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-1453
>                 URL: https://issues.apache.org/jira/browse/SLING-1453
>             Project: Sling
>          Issue Type: Improvement
>          Components: JCR
>    Affects Versions: JCR Jackrabbit User Manager 2.1.0
>            Reporter: Eric Norman
>            Assignee: Eric Norman
>             Fix For: JCR Jackrabbit User Manager 2.1.0
>
>
> Scripts that need to modify users or groups often need to know (user/group) 
> actions the the current user is provisioned to perform to conditionally 
> render sections of the page.  To assist in that end, an 
> AuthorizablePrivilegesInfo service should assist the script writer in 
> determining what is possible.
> The service interface will contain these methods:
>       /**
>        * Checks whether the current user has been granted privileges
>        * to add a new user.
>        *  
>        * @param jcrSession the JCR session of the current user
>        * @return true if the current user has the privileges, false otherwise
>        */
>       boolean canAddUser(Session jcrSession);
>       /**
>        * Checks whether the current user has been granted privileges
>        * to add a new group.
>        *  
>        * @param jcrSession the JCR session of the current user
>        * @return true if the current user has the privileges, false otherwise
>        */
>       boolean canAddGroup(Session jcrSession);
>       
>       /**
>        * Checks whether the current user has been granted privileges
>        * to update the properties of the specified user or group.
>        *  
>        * @param jcrSession the JCR session of the current user
>        * @param principalId the user or group id to check
>        * @return true if the current user has the privileges, false otherwise
>        */
>       boolean canUpdateProperties(Session jcrSession,
>                       String principalId);
>       /**
>        * Checks whether the current user has been granted privileges
>        * to remove the specified user or group.
>        *  
>        * @param jcrSession the JCR session of the current user
>        * @param principalId the user or group id to check
>        * @return true if the current user has the privileges, false otherwise
>        */
>       boolean canRemove(Session jcrSession,
>                       String principalId);
>       
>       /**
>        * Checks whether the current user has been granted privileges
>        * to update the membership of the specified group.
>        *  
>        * @param jcrSession the JCR session of the current user
>        * @param groupId the group id to check
>        * @return true if the current user has the privileges, false otherwise
>        */
>       boolean canUpdateGroupMembers(Session jcrSession,
>                       String groupId);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to