cancel
Showing results for 
Search instead for 
Did you mean: 

Don't hand over global rights to folders

mb1811
Champ in-the-making
Champ in-the-making
Hi!

Seems to me, the german forum is a bit quiet, so i'll try to find an answer here 😉

I set up an folder struckture that fit's to our company, set up rights and made a template by copying that to the repository folder.

We do sync our users and groups from Active Directory.
Setting up rights in that template folder, I unchecked the box where it says to hand over the rights from a higher folder.
I just want to use local rights!

Whe I set up a new site and try to create a folder from template the box is checked again and I got all the global rights. Same happens when I try to copy such folder.


The folder strukture is like this:

Template
|- Financials
|- Quality
|- Production
|- Sales

We do have groups named the same in Active Directory. So each group gets access to it's folder.
When a User from Sales creates a new folder by template for a new project Alfresco just greates the "Sales" folder. Because he just got rights to that folder.

The idea is if any user creates a new project folder from template that every folder is created with just local rights (see above) and all subfolders.

Is there a way to set up something like that?

Thanks
Matt
4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator
Hello,

yeah, the German forum is very quiet - I was trying to be active for a while (way back in 2012/2013), but after a while without any questions / discussions, I simply forgot to go back there.

Unfortunately, "Create from template" only copies the structures and does nothing with permissions, so the default behaviour triggeres (no local rights and inheritance from parent).

You will have to work with some JavaScript scripting to get this to work the way you want. One option would be to set up a rule on the Sites folder that applies to all sub-folders and triggers on the creation of a new folder. You can put a script into the Data Dictionary/Scripts folder that can be triggered from the rule. This script would then have to check the folder to see if it has been created from a template (that information is not transported otherwise) and then apply the custom permissions.

All of this - so far - can be done without Java programming or server restarts. The only "programming" required is related to JavaScript and usage of the Alfresco Script API.

Regards
Axel

mb1811
Champ in-the-making
Champ in-the-making
Thanks for reply!

It does actually pick up the rights that have been set in the template. When I uncheck the "hand over" checkbox I can see all local rights I set up.

Is there a way to uncheck that box by JavaScript?

Is there any summary / tutorial about what is possible with JavaScript in Alfresco?

Thanks

borisstankov
Champ in-the-making
Champ in-the-making
Hi there,

Would you please be so kind to put a simple step-by-step plan how did you do this? I mean how did you manage to create such a template and then setup the permissions to be specific by this template. Smiley Happy

I consider myself new with Alfresco, so I'll need more how-tos in order to learn Smiley Sad

All the BEST!

afaust
Legendary Innovator
Legendary Innovator
Hello,

yes, it is possible to uncheck that box via JavaScript. The API is documented <a href="http://docs.alfresco.com/community/references/API-JS-Scripting-API.html">here</a>. You are looking for the ScriptNode API concerning permissions and the setInheritsPermissions operation.

Regards
Axel