cancel
Showing results for 
Search instead for 
Did you mean: 

PermissionService: hasPermission for other user than current

Not applicable
Hello,

I am looking for something similar to what PermissionService#hasPermission does, but not for the currently logged-in user. Basically, I would like to traverse the whole repository (as the administrator) and keep track of what user can access what documents. Given the public API I can only see two ways;

1. Log in as each user and traverse what's possible, which has the disadvantage that it needs each user's password in plain text.

2. Parse the AccessPermission objects myself to determine who has access, which is somewhat fragile (but is what I'm doing right now).

As far as I can see, I would need to extend/replace the PermissionServiceImpl to avoid the dangerous code duplication of 2.—or am I missing a straightforward way?

TIA,

Julian
1 REPLY 1

hbf
Champ on-the-rise
Champ on-the-rise
Hi Julian,

I am looking for something similar to what PermissionService#hasPermission does, but not for the currently logged-in user.

I've had a similar problem and found a post about this here.

As far as I can see, I would need to extend/replace the PermissionServiceImpl to avoid the dangerous code duplication of 2.—or am I missing a straightforward way?

The above post mentions another way (AuthenticationUtil RunAs support), but as the number of users in need for this feature seems to grow, you might want to open a JIRA issue (where people can vote for the feature – although I don't know whether this is currently honoured).

Hope this helps,
Kaspar
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.