use of org.apache.jackrabbit.oak.spi.security.authorization.restriction.CompositeRestrictionProvider in project jackrabbit-oak by apache.
the class CompositeAuthorizationConfigurationTest method testSingleRestrictionProvider.
@Test
public void testSingleRestrictionProvider() {
CompositeAuthorizationConfiguration cc = getCompositeConfiguration(createAuthorizationConfigurationImpl());
RestrictionProvider rp = cc.getRestrictionProvider();
assertFalse(rp instanceof CompositeRestrictionProvider);
}
use of org.apache.jackrabbit.oak.spi.security.authorization.restriction.CompositeRestrictionProvider in project jackrabbit-oak by apache.
the class CompositeAuthorizationConfigurationTest method testOnlyEmptyRestrictionProvider.
@Test
public void testOnlyEmptyRestrictionProvider() {
AuthorizationConfiguration ac = new OpenAuthorizationConfiguration() {
@Nonnull
@Override
public RestrictionProvider getRestrictionProvider() {
return RestrictionProvider.EMPTY;
}
};
CompositeAuthorizationConfiguration cc = getCompositeConfiguration(ac, ac);
RestrictionProvider rp = cc.getRestrictionProvider();
assertFalse(rp instanceof CompositeRestrictionProvider);
assertSame(RestrictionProvider.EMPTY, rp);
}
use of org.apache.jackrabbit.oak.spi.security.authorization.restriction.CompositeRestrictionProvider in project jackrabbit-oak by apache.
the class CompositeAuthorizationConfigurationTest method testMultipleWithEmptyRestrictionProvider.
@Test
public void testMultipleWithEmptyRestrictionProvider() {
CompositeAuthorizationConfiguration cc = getCompositeConfiguration(createAuthorizationConfigurationImpl(), new OpenAuthorizationConfiguration() {
@Nonnull
@Override
public RestrictionProvider getRestrictionProvider() {
return RestrictionProvider.EMPTY;
}
});
RestrictionProvider rp = cc.getRestrictionProvider();
assertFalse(rp instanceof CompositeRestrictionProvider);
assertNotSame(RestrictionProvider.EMPTY, rp);
}
use of org.apache.jackrabbit.oak.spi.security.authorization.restriction.CompositeRestrictionProvider in project jackrabbit-oak by apache.
the class CompositeAuthorizationConfigurationTest method testMultipleRestrictionProvider.
@Test
public void testMultipleRestrictionProvider() {
CompositeAuthorizationConfiguration cc = getCompositeConfiguration(createAuthorizationConfigurationImpl(), createAuthorizationConfigurationImpl());
RestrictionProvider rp = cc.getRestrictionProvider();
assertTrue(rp instanceof CompositeRestrictionProvider);
}
Aggregations