Remove the existing permissions from the parent document in alfresco through database

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Remove the existing permissions from the parent document in alfresco through database

When I go to the document library of any project in alfresco version 3.4.14 and click on inherit permissions to remove existing permissions and save it, by this all permissions get removed from the project. But I want to do this in bulk for many projects using database. Please suggest solutions for this.

1 Reply
Highlighted
Professional

Re: Remove the existing permissions from the parent document in alfresco through database

Making changes by updating the data in the Alfresco database directly is unsafe, unsupported, and is not even necessary in this case.

You should just install the Alfresco JavaScript console, then write a script to do it. Or, if you don't want to do that, write a web script.

Regardless of whether it runs from the JavaScript console or the controller of a web script, the server-side JavaScript to set the parent to not inherit looks like:

folder.setInheritsPermissions(false);‍‍

If you need help figuring out how to get the folder object, like through a query, take a look at the JavaScript API docs.