jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marco <pioves...@esteco.com>
Subject Group permission ignored when accessing node
Date Wed, 02 Mar 2016 12:08:28 GMT
I'm using Oak v1.3.15. I've got the same problem described in  this
I have a group called "MyUsers" containing a user called "marco". I've
created a folder called "testfolder" with admin account and i granted read
permission to the "MyUsers" group. When I login as "marco" if i try to find
that folder i get an error saying that the folder doesn't exists. I did
check the ACLs as mentioned in the other post but the only only one i see is
the one that grants read permission to the group.

Here is what i did to grant the permission:

Session adminSession = repository.login(new SimpleCredentials("admin",
Group myUsersGroup = ((SessionImpl)
Authorizable marco = ((SessionImpl)
Node testfolder = adminSession.getNode("/testfolder");
boolean allow = AccessControlUtils.allow(testfolder,
myUsersGroup.getPrincipal(), new String[]{Privilege.JCR_READ});

userSession = repository.login(new SimpleCredentials("marco",
Node node = userSession.getNode("/testfolder"); //here the code fails
because the node is not found!!

What am I doing wrong? If i grant the read permission directly to the user
everything works fine.


View this message in context: http://jackrabbit.510166.n4.nabble.com/Group-permission-ignored-when-accessing-node-tp4663764.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.

View raw message