// No groups.
assertNull(document.findProperty(SpiConstants.PROPNAME_ACLGROUPS));
}
public void testScopedRoleAcl() throws RepositoryException {
Document document = extractJcrDocument("MockRepositoryEventLogAcl.txt",
"user_scoped_role_acl");
// ACL=["user:joe=reader","user:mary=reader,writer","user:admin=owner"]
// user:joe=reader
JcrProperty property =
(JcrProperty) document.findProperty(SpiConstants.PROPNAME_ACLUSERS);
assertNotNull(property);
assertContainsScope("joe", property);
JcrProperty scopeRoles = (JcrProperty) document.findProperty(
SpiConstants.USER_ROLES_PROPNAME_PREFIX + "joe");
assertNotNull(scopeRoles);
assertContainsRole("reader", scopeRoles);
// user:mary=reader,writer
property =
(JcrProperty) document.findProperty(SpiConstants.PROPNAME_ACLUSERS);
assertContainsScope("mary", property);
scopeRoles = (JcrProperty) document.findProperty(
SpiConstants.USER_ROLES_PROPNAME_PREFIX + "mary");
assertNotNull(scopeRoles);
assertContainsRole("reader", scopeRoles);
scopeRoles = (JcrProperty) document.findProperty(
SpiConstants.USER_ROLES_PROPNAME_PREFIX + "mary");
assertContainsRole("writer", scopeRoles);
// user:admin=owner
property =
(JcrProperty) document.findProperty(SpiConstants.PROPNAME_ACLUSERS);
assertContainsScope("admin", property);
scopeRoles = (JcrProperty) document.findProperty(
SpiConstants.USER_ROLES_PROPNAME_PREFIX + "admin");
assertNotNull(scopeRoles);
assertContainsRole("owner", scopeRoles);
// No groups.
assertNull(document.findProperty(SpiConstants.PROPNAME_ACLGROUPS));
}