cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Inherit Parent Space Pemission?

kblade
Champ in-the-making
Champ in-the-making
I am using RESTful API.
I want to set Inherit Parent Space Permissions to true.
Which service can I use?
5 REPLIES 5

jonash
Champ in-the-making
Champ in-the-making
You could use the web script that Share uses to set permissions:


POST /alfresco/service/slingshot/doclib/permissions/{store_type}/{store_id}/{id}

It accepts a POST with a JSON object containing a "permissions" field (list of permissions to set/remove) and a "isInherited" boolean field.

Note that this is part of the internal Share API and not the public REST API so it could change between Alfresco versions.

kblade
Champ in-the-making
Champ in-the-making
Thanks.  I will try it out and feedback later.
Can I know if there is easy way to retrieve all the id ?
I mean on bulk.

scouil
Star Contributor
Star Contributor
Hello kblade,

What exactly are you trying to do? In what context?
Is it a recurrent task you want to run or is it just once?

Because depending on your requirements, coding an external application listing the folders via a rest call and iterating to change their permissions with 1 REST call each time might not be the best way to go.

Regards,

kblade
Champ in-the-making
Champ in-the-making
Yeah that what I have in mind.  To set all user space or folder permission to true.
The application will run only once (at the beginning) over LAN or on the localhost machine. 
Or course, retrieving all id interest me because few of the RESTful API also required it.

scouil
Star Contributor
Star Contributor
For this kind of operations I personally use the javascript console addon: http://code.google.com/p/share-extras/wiki/JavascriptConsole
It enables you to directly run javascript code against alfresco.

If you'd rather use rest interfaces, you'll see the list of the available explorer services here:
http://<your server>/alfresco/s/
and the list of Share services here:
http://<your server>/share/service/index