use of org.apache.jackrabbit.oak.spi.security.authorization.permission.RepositoryPermission in project jackrabbit-oak by apache.
the class CompositeProviderFullScopeTest method testRepositoryPermissionIsGrantedAdminUser.
@Test
public void testRepositoryPermissionIsGrantedAdminUser() throws Exception {
RepositoryPermission rp = cppAdminUser.getRepositoryPermission();
assertTrue(rp.isGranted(Permissions.NAMESPACE_MANAGEMENT));
assertFalse(rp.isGranted(Permissions.NODE_TYPE_DEFINITION_MANAGEMENT));
assertFalse(rp.isGranted(Permissions.NAMESPACE_MANAGEMENT | Permissions.NODE_TYPE_DEFINITION_MANAGEMENT));
assertFalse(rp.isGranted(Permissions.PRIVILEGE_MANAGEMENT));
assertFalse(rp.isGranted(Permissions.NAMESPACE_MANAGEMENT | Permissions.PRIVILEGE_MANAGEMENT));
assertFalse(rp.isGranted(Permissions.ALL));
}
use of org.apache.jackrabbit.oak.spi.security.authorization.permission.RepositoryPermission in project jackrabbit-oak by apache.
the class CompositeProviderCoverageTest method testRepositoryPermissionsIsGranted.
@Test
public void testRepositoryPermissionsIsGranted() throws Exception {
RepositoryPermission rp = cpp.getRepositoryPermission();
assertTrue(rp.isGranted(Permissions.NAMESPACE_MANAGEMENT));
assertFalse(rp.isGranted(Permissions.NODE_TYPE_DEFINITION_MANAGEMENT));
assertFalse(rp.isGranted(Permissions.ALL));
}
use of org.apache.jackrabbit.oak.spi.security.authorization.permission.RepositoryPermission in project jackrabbit-oak by apache.
the class CompositeProviderFullScopeTest method testRepositoryPermissionIsGranted.
@Test
public void testRepositoryPermissionIsGranted() throws Exception {
RepositoryPermission rp = cppTestUser.getRepositoryPermission();
assertTrue(rp.isGranted(Permissions.NAMESPACE_MANAGEMENT));
assertFalse(rp.isGranted(Permissions.NODE_TYPE_DEFINITION_MANAGEMENT));
assertFalse(rp.isGranted(Permissions.NAMESPACE_MANAGEMENT | Permissions.NODE_TYPE_DEFINITION_MANAGEMENT));
}
use of org.apache.jackrabbit.oak.spi.security.authorization.permission.RepositoryPermission in project jackrabbit-oak by apache.
the class CompositeProviderNoScopeTest method testRepositoryPermissionIsGrantedAdminUser.
@Test
public void testRepositoryPermissionIsGrantedAdminUser() throws Exception {
RepositoryPermission rp = cppAdminUser.getRepositoryPermission();
assertTrue(rp.isGranted(Permissions.ALL));
}
use of org.apache.jackrabbit.oak.spi.security.authorization.permission.RepositoryPermission in project jackrabbit-oak by apache.
the class CompositeProviderNoScopeTest method testRepositoryPermissionIsGranted.
@Test
public void testRepositoryPermissionIsGranted() throws Exception {
RepositoryPermission rp = cppTestUser.getRepositoryPermission();
assertTrue(rp.isGranted(Permissions.NAMESPACE_MANAGEMENT));
assertTrue(rp.isGranted(Permissions.NODE_TYPE_DEFINITION_MANAGEMENT));
assertTrue(rp.isGranted(Permissions.NAMESPACE_MANAGEMENT | Permissions.NODE_TYPE_DEFINITION_MANAGEMENT));
}
Aggregations