- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to update the SiteStore Permissions?
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,
- Labels:
-
Developers
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

