How to update the SiteStore Permissions?
Author: Jamuna
Publication Date: 5/24/2021 14:09
Hello,
I'm tring to update the sitestore permissions through Java Api and If the roles not available I have to add the roles using Add group.
select sitestore->extras->change permissions
SiteStoreRoot root = (SiteStoreRoot) project.getUserService().getStore(Store.Type.SITESTORE, false);
root.getDefinedPrincipalPermissions();\\returns the list of groups in store
Permission permission = root.getPermission(group);
permission.canChangePermission());//return the field values
But how to set values to the fields and how to add the groups using JavaApi?
FYR,

Tags: Permissions, sitestore, store, store permission, storeelement
-
Author: felix_reinhold - 5/27/2021 7:11
Hi Jamuna,
have you tried permission.allow(int p) and permission.forbid(int p) combined with setPermission?
permission.allow(Permission.CAN_RELEASE);
permission.forbid(Permission.CAN_META_CHANGE);
root.setPermission(permission);
Best regards
Felix
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
1 commentaire