Jump to content

Retrieving object permissions of repo folder


jojopaderes

Recommended Posts

I'm figuring out how to retrieve the list of object permissions for a repository folder. Here's the code snippet that works so far:

 

objectPermissionService.getObjectPermissionsForObject(null, repositoryService.getFolder(null, "/report/child_folder));

 

The list object returned by the getObjectPermissionsForObject() method, however, does not include the inherited user/role permissions from the parent folder.

 

Is there a way on how to get the inherited object permissions for a repo folder?

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

getObjectPermissionsForObject() does not return inherited permissions.  If you want that, you can cast the object permission service to com.jaspersoft.jasperserver.api.metadata.user.service.impl.AclService and call getAcls().  Note that this method returns different objects, so you might need to adapt your code.

Another approach is to manually call getObjectPermissionsForObject() for all parent folders and collect the inherited permissions.

Regards,

Lucian

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...