Apply permissions on a folder with a lot of subfolders and content

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner

Apply permissions on a folder with a lot of subfolders and content

Jump to solution

Hi!

We need to apply permissions for specific users on a folder with a lot of subfolders and nodes (approx 200'000 documents).

If we apply the permissions directly on the parent node, it will cause a timeout and it may create problems with solr at the end.

I can image that I have to start from the deepest folder and iterate backwards through the tree. 

Can somebody give me a hint how to solve that problem in an efficient way?

Best regards

Kaffi

1 Solution

Accepted Solutions
Highlighted
Senior Member

Re: Apply permissions on a folder with a lot of subfolders and content

Jump to solution

Hi

Where exactly is the timeout - the UI, the DB, ....

If you are adding a restriction to an existing access control list this operation is fast. If you are adding the first access entry to a node then there is a cascade update of nodes. In the first case there is no problem - you can plan for the second and create an access control list on nodes when you expect to add restrictions to avoid the cascade issue.

If you are in the second position you do not have to do this in one big transaction. There is a javascript variant of the API that will do the cascade update in batches. I do not think share uses that API.

It will not create problems with SOLR. SOLR does however have to reflect your changes and that may take some time to update 200,000 nodes. Using search services the cascade update for some cases is now split out from the normal flow of indexing updated nodes. It can not be split out for this case as all of the nodes are actually updated with a new ACL.

Iterating through the tree yourself will take longer and create more ACLs on every node that cascade update the ACL tree as the next node above is set.

Regards

Andy

View solution in original post

1 Reply
Highlighted
Senior Member

Re: Apply permissions on a folder with a lot of subfolders and content

Jump to solution

Hi

Where exactly is the timeout - the UI, the DB, ....

If you are adding a restriction to an existing access control list this operation is fast. If you are adding the first access entry to a node then there is a cascade update of nodes. In the first case there is no problem - you can plan for the second and create an access control list on nodes when you expect to add restrictions to avoid the cascade issue.

If you are in the second position you do not have to do this in one big transaction. There is a javascript variant of the API that will do the cascade update in batches. I do not think share uses that API.

It will not create problems with SOLR. SOLR does however have to reflect your changes and that may take some time to update 200,000 nodes. Using search services the cascade update for some cases is now split out from the normal flow of indexing updated nodes. It can not be split out for this case as all of the nodes are actually updated with a new ACL.

Iterating through the tree yourself will take longer and create more ACLs on every node that cascade update the ACL tree as the next node above is set.

Regards

Andy

View solution in original post