cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with permissions

strinchero
Champ in-the-making
Champ in-the-making
Hi, i have a problem with permissions. I have a simple interface to setup permissions for group on an attachment (children node of current node), for all groups it performs (for READ and READ_CONTENT):

m_permissionService.deletePermission(m_nodeAttachment, (String)group.getValue(), PermissionService.READ);

then, the new set of permissione get applied (for READ e READ_CONTENT):

m_permissionService.setPermission(m_nodeAttachment, selected, PermissionService.READ, true);

This fail if i'm re-setting a permssion (teorically removed on the first step) on a group. Is this a bug or an intendev behavior ? in case it' a behavior, how can i check if an authority has or not a permission  ?

I'm working with alfresco 1.4 RC1 since i need the new features.
1 REPLY 1

kevinr
Star Contributor
Star Contributor
Use the PermissionService.hasPermission() method to query if the current authority is granted a specific permission on a node. If you want to query against a user other than the current, then use the PermissionService.getAllSetPermissions() method to retrieve all permissions set on a node for all users.

Thanks,

Kevin