Possibility to apply same "permissions" on all store elements via script
Author: Yamini
Publication Date: 6/9/2021 8:02
Dear community
In site architect, Is it possible to inherit the permissions from site store folder(blue structure) to page content folder (green structure ) directly via a script, if someone changes the permission at site store level?
Kindly suggest.
Tags: permissionservice, site store, sitearchitecture, sitestore, store permission
-
Author: felix_reinhold - 6/9/2021 9:14
Hi Yamini,
haven't tried that, but I'd guess you could do sth. like this:
yourPageRefFolder.getDefinedPrincipalPermissions().forEach(principal -> {
yourPageFolder.setPermission(principal, yourPageRefFolder.getPermission(principal));
});
As a trigger you could use a PermissionListener - in that case you wouldn't even need to set all permission, since it provides the changed permission.
Best regards
Felix
0 -
Author: hoebbel - 6/10/2021 14:52
Dear Yamini,
but be aware, that a pagestorefolder isn't referred from a pagereffolder and a page can be referred from more than one pageref.
So even if you take the startnode (or any pageref) from a pagereffolder and then the parent element of the referred page, the change of the permissions may provide unexpected results.
The structure of the sitestore and pagestore can be completely different, especially on old projects!
Best regards
Holger
0
Please sign in to leave a comment.
Comments
2 comments