use of org.apache.jackrabbit.oak.security.authorization.AuthorizationConfigurationImpl in project jackrabbit-oak by apache.
the class CompositeAuthorizationConfigurationTest method testSingleRestrictionProvider.
@Test
public void testSingleRestrictionProvider() {
CompositeAuthorizationConfiguration cc = getCompositeConfiguration(new AuthorizationConfigurationImpl(getSecurityProvider()));
RestrictionProvider rp = cc.getRestrictionProvider();
assertFalse(rp instanceof CompositeRestrictionProvider);
}
use of org.apache.jackrabbit.oak.security.authorization.AuthorizationConfigurationImpl in project jackrabbit-oak by apache.
the class CompositeAuthorizationConfigurationTest method testMultipleGetAccessControlManager.
@Test
public void testMultipleGetAccessControlManager() throws RepositoryException {
CompositeAuthorizationConfiguration cc = getCompositeConfiguration(new AuthorizationConfigurationImpl(getSecurityProvider()), new AuthorizationConfigurationImpl(getSecurityProvider()));
AccessControlManager accessControlManager = cc.getAccessControlManager(root, NamePathMapper.DEFAULT);
assertTrue(accessControlManager instanceof CompositeAccessControlManager);
}
use of org.apache.jackrabbit.oak.security.authorization.AuthorizationConfigurationImpl in project jackrabbit-oak by apache.
the class CompositeAuthorizationConfigurationTest method testMultipleRestrictionProvider.
@Test
public void testMultipleRestrictionProvider() {
CompositeAuthorizationConfiguration cc = getCompositeConfiguration(new AuthorizationConfigurationImpl(getSecurityProvider()), new AuthorizationConfigurationImpl(getSecurityProvider()));
RestrictionProvider rp = cc.getRestrictionProvider();
assertTrue(rp instanceof CompositeRestrictionProvider);
}
use of org.apache.jackrabbit.oak.security.authorization.AuthorizationConfigurationImpl in project jackrabbit-oak by apache.
the class CompositeAuthorizationConfigurationTest method testSingleGetPermissionProvider.
@Test
public void testSingleGetPermissionProvider() {
CompositeAuthorizationConfiguration cc = getCompositeConfiguration(new AuthorizationConfigurationImpl(getSecurityProvider()));
PermissionProvider pp = cc.getPermissionProvider(root, root.getContentSession().getWorkspaceName(), Collections.<Principal>emptySet());
assertFalse(pp instanceof CompositePermissionProvider);
}
use of org.apache.jackrabbit.oak.security.authorization.AuthorizationConfigurationImpl in project jackrabbit-oak by apache.
the class CompositeAuthorizationConfigurationTest method testMultipleGetPermissionProvider.
@Test
public void testMultipleGetPermissionProvider() {
CompositeAuthorizationConfiguration cc = getCompositeConfiguration(new OpenAuthorizationConfiguration(), new AuthorizationConfigurationImpl(getSecurityProvider()));
PermissionProvider pp = cc.getPermissionProvider(root, root.getContentSession().getWorkspaceName(), Collections.<Principal>emptySet());
assertFalse(pp instanceof CompositePermissionProvider);
}
Aggregations