01-17-2019 04:18 AM
We have repository with tree folder structure, where there is only one parent folder per a huge set of subfolders number of which is constantly growing.
So, there are thousands of folders with one parent folder, and there are few such folder conglomerats.
On creation of each folder background folder rule script is executed. The rule is on root folder.
function main()
{
if (document.isContainer)
{
document.setInheritsPermissions(false);document.setPermission("Consumer", "GROUP_someGroup1");
document.setPermission("Coordinator", "GROUP_someGroup2");
document.setPermission("Coordinator", "GROUP_someGroup3");
}
}main();
The purpose is to turn off inheritence and to add default groups to each subfolder.
The rule description is
setpermissions
Description:ActiveRun in backgroundRule applied to subfolderWhen:Items are created or enter this folder
If all criteria are met:
Is of type (or sub type) 'Folder'
Perform Action:
Execute 'setpermisions.js' script
It is done via rule, because it is not possible to turn off inheritence via CMIS.
Till now we have never problems with such folder rule execution, so there we no even need to make any error logging for them.
But we have one occasion, when one subfolder was created and default groups were not added.
So the question is, does folder rule mechanism have some limitation?
Alfresco Community (Build: 201612)
01-18-2019 04:35 AM
Folder rules do not have any builtin limitations regarding depth, but there is an aspect rule:ignoreInheritedRules which can be applied to a folder and if applied, rules will not be inherited.
01-18-2019 04:35 AM
Folder rules do not have any builtin limitations regarding depth, but there is an aspect rule:ignoreInheritedRules which can be applied to a folder and if applied, rules will not be inherited.
Explore our Alfresco products with the links below. Use labels to filter content by product module.