cancel
Showing results for 
Search instead for 
Did you mean: 

Listing the user privilèges in a specific folder

kameljahloug
Champ in-the-making
Champ in-the-making
Hi everybody
i want to know if there is any java methode or any topics about how to know user role on a specific folder (Consumer, Contributor, Collaborator…)
Thanks
5 REPLIES 5

romschn
Star Collaborator
Star Collaborator
AFAIK, there isn't any direct API method available to get the user role from the node.There is a very good add-on available which achieves the similar functionality. It's available at - https://addons.alfresco.com/addons/permission-label-share-increase-alfresco-user-engagement. You may want to use this add-on for your project.

Hope this helps.

kameljahloug
Champ in-the-making
Champ in-the-making
thank's for the reply
For my project i use differentes methode's ex : uploadfile, create folder … and now i want to manage my folders and files , example : if the user has the role consumer he can't delete a file any solution for this probleme
thank you

Just wanted to understand, Are you having a custom front-end application and interacting with Alfresco repository and not using the Alfresco Share UI? Is that correct?

kameljahloug
Champ in-the-making
Champ in-the-making
Hi thank you for the replay
Yes i am using alfresco like a repository and want to use the user role de limite the access of users

Okay. I would suggest you to take a look at PermissionService in Alfresco. Check if getPermissions() method can give you the raw data for what you require.
Also, if it does not work then take a look at other methods as well. These methods will give you a hint to proceed with your scenario.
Sharing the Javadoc link for your reference. http://dev.alfresco.com/resource/docs/java/org/alfresco/service/cmr/security/PermissionService.html

Hope this helps.