cancel
Showing results for 
Search instead for 
Did you mean: 

Permission API

akie
Champ in-the-making
Champ in-the-making
Hi Everyone,

     I'm newbie alfresco.I read http://wiki.alfresco.com/wiki/3.4_JavaScript_API#Permission_and_Security_API but I am not yet to know how to start. I need to example API for get all permission step by step. Somebody help me.

     Thank so much.
6 REPLIES 6

akie
Champ in-the-making
Champ in-the-making
somebody help me

mikeh
Star Contributor
Star Contributor
I suspect you haven't had any replies because you haven't stated very clearly what you are trying to achieve; what you've already tried; what you don't understand and need explaining; etc.

Please try to be more specific with questions rather than just "I read an article and don't get it".

Thanks,
Mike

akie
Champ in-the-making
Champ in-the-making
Thank you Mike,

     I want to api for get permission all folder and make report in website. Example who can access which folder. I try to study database relation but I don't have more knowledge.

mrogers
Star Contributor
Star Contributor
A crude way would be to loop through all users calling hasReadPermission(folderNodeRef). :roll:

A less crude way would be to call getPermissions(folderNodeRef) to receive a list of AccessPermissions.
You can then look for "Read" Permission and "ALLOWED" to get the corresponding authority name.
For the case where the authority is a group you could then call the authority service or the group service to work out the users contained within that group.

EDIT - the above is for the Java API.

For Java script the approach is much the same but you would call getPermissions on a script node and then iterate through those results.   The crude way would not work on the Script API.

andy
Champ on-the-rise
Champ on-the-rise
Hi

The Java API has a method to get all thre Authorities directly granted read permission.
You woud have to expand groups to include all thier members.

Andy

akie
Champ in-the-making
Champ in-the-making
thank mrogers and Andy

If you have example code or URL for java api, please help me.