Questions & Answers

SOLVED
Jamuna
I'm new here

How to update the SiteStore Permissions?

Jump to solution

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,

431167_pastedImage_0.png

1 Solution

Accepted Solutions
felix_reinhold
Returning Responder

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

View solution in original post

1 Reply
felix_reinhold
Returning Responder

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

Type a product name