Zum Hauptinhalt gehen

Possibility to apply same "permissions" on all store elements via script

Kommentare

2 Kommentare

  • Zendesk API User
    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
  • Zendesk API User
    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

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.