use of org.apache.jackrabbit.oak.spi.security.authorization.cug.impl.CugConfiguration in project jackrabbit-filevault by apache.
the class CugHandlingTest method createSecirityProvider.
private static SecurityProvider createSecirityProvider() {
ConfigurationParameters params = ConfigurationParameters.of("cugSupportedPaths", TEST_ROOT, "cugEnabled", true);
CugConfiguration cugConfiguration = new CugConfiguration();
cugConfiguration.setParameters(params);
SecurityProvider result = SecurityProviderBuilder.newBuilder().with(ConfigurationParameters.of(params)).build();
SecurityProviderHelper.updateConfig(result, cugConfiguration, AuthorizationConfiguration.class);
return result;
}
use of org.apache.jackrabbit.oak.spi.security.authorization.cug.impl.CugConfiguration in project jackrabbit-oak by apache.
the class L3_UnderstandAggregationTest method initSecurityProvider.
@Override
protected SecurityProvider initSecurityProvider() {
SecurityProvider sp = super.initSecurityProvider();
CugConfiguration cugConfiguration = new CugConfiguration();
cugConfiguration.setParameters(ConfigurationParameters.of("cugSupportedPaths", new String[] { "/content" }, "cugEnabled", true));
SecurityProviderHelper.updateConfig(sp, cugConfiguration, AuthorizationConfiguration.class);
return sp;
}
use of org.apache.jackrabbit.oak.spi.security.authorization.cug.impl.CugConfiguration in project jackrabbit-oak by apache.
the class CugTest method newTestSecurityProvider.
private static SecurityProvider newTestSecurityProvider(@NotNull ConfigurationParameters params, boolean reverseOrder) {
SecurityProvider delegate = SecurityProviderBuilder.newBuilder().with(params).build();
CompositeAuthorizationConfiguration authorizationConfiguration = (CompositeAuthorizationConfiguration) delegate.getConfiguration((AuthorizationConfiguration.class));
AuthorizationConfiguration defaultAuthorization = checkNotNull(authorizationConfiguration.getDefaultConfig());
if (reverseOrder) {
authorizationConfiguration.addConfiguration(defaultAuthorization);
authorizationConfiguration.addConfiguration(new CugConfiguration(delegate));
} else {
authorizationConfiguration.addConfiguration(new CugConfiguration(delegate));
authorizationConfiguration.addConfiguration(defaultAuthorization);
}
return delegate;
}
Aggregations