lodopidolo
lodopidolo

Reputation: 175

Alfresco space user permissions

I have an alfresco folder (PARENT_FOLDER) with more than 300 subfolder, and I want to grant consumer role to certain group (GROUP1) and certain subfolder (PARENT_FOLDER/FOLDER1), and consumer role to other group (GROUP2) and all subfolder.

All subfolders have "Inherit Parent Space Permissions" activated, and parent folder has this space user permissions:

The PARENT_FOLDER/FOLDER1 has:

With this configuration:

I think the solution is revoke "Inherit Parent Space Permissions" and specify this user space permissions:

but make it is very difficult because I can't select many subfolders and change their user permissions. I was looking to make it from database model (postgres) but I haven't got sufficient model knowledge to do it. I was looking to make this permission changes from CMIS, but I didn't find anything.

Question 1: How can I change space user permissions to many alfresco object at once?

Question 2: Do you know other way to do what I need?

Thanks.

Upvotes: 0

Views: 661

Answers (1)

Andreas Steffan
Andreas Steffan

Reputation: 6159

Go get yourself the Javascript Console from https://github.com/share-extras/js-console and set permissions with some basic scripting. Assuming you picked the parent as space, it should goes roughly like this:

space.children.forEach(function(n) {
    // use n.setPermission/removePermission/setInheritPermission
    n.save();// Not quite sure whether save is needed here
});

The ScriptNode API is at http://wiki.alfresco.com/wiki/4.0_JavaScript_API#Permission_and_Security_API.

Upvotes: 1

Related Questions