Hello Experts,
I would like to get all allowed users (read/write) list for a given resource path.
Let say I have a user called 'test-user' and I gave read/write permissions for '/content' folder and all child folders under '/content' folder.
I would like to write a API bypassing a resource path as a request parameter (could be '/content' or any children of '/content')
and get all the allowed users (read/write) for that given path.
I wrote the below code, but it's returning the only configured users for the given resource node.
let say as I said above, 'test-user' configured for '/content' folder and all children, when I called below code for '/content/dam' folder 'test-user' isn't returning.
@Override
public JackrabbitAccessControlList getAccessControlList(final @notnull String path) {
//Getting resource resolver by using service user
ResourceResolver resolver = getResourceResolver();
Resource resource = resolver.getResource(path);
Session session = resolver.adaptTo(Session.class);
JackrabbitAccessControlList acl = null;
try {
acl = AccessControlUtils.getAccessControlList(session, resource.getPath());
} catch (RepositoryException e) {
logger.error("Failed to retrive the user permission ", e);
}
return acl;
}
Any thoughts.?
Solved! Go to Solution.
Cna you please check if this helps
https://jackrabbit.apache.org/oak/docs/security/permission.html
Cna you please check if this helps
https://jackrabbit.apache.org/oak/docs/security/permission.html
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies