Search in sources :

Example 1 with CompositeSystemAuthoritiesProvider

use of org.hisp.dhis.security.authority.CompositeSystemAuthoritiesProvider in project dhis2-core by dhis2.

the class AuthoritiesProviderConfig method systemAuthoritiesProvider.

@Primary
@Bean("org.hisp.dhis.security.SystemAuthoritiesProvider")
public SystemAuthoritiesProvider systemAuthoritiesProvider() {
    SchemaAuthoritiesProvider schemaAuthoritiesProvider = new SchemaAuthoritiesProvider(schemaService);
    AppsSystemAuthoritiesProvider appsSystemAuthoritiesProvider = new AppsSystemAuthoritiesProvider(appManager);
    DetectingSystemAuthoritiesProvider detectingSystemAuthoritiesProvider = new DetectingSystemAuthoritiesProvider();
    detectingSystemAuthoritiesProvider.setRequiredAuthoritiesProvider(requiredAuthoritiesProvider());
    CompositeSystemAuthoritiesProvider provider = new CompositeSystemAuthoritiesProvider();
    provider.setSources(ImmutableSet.of(new CachingSystemAuthoritiesProvider(detectingSystemAuthoritiesProvider), new CachingSystemAuthoritiesProvider(moduleSystemAuthoritiesProvider()), new CachingSystemAuthoritiesProvider(simpleSystemAuthoritiesProvider()), schemaAuthoritiesProvider, appsSystemAuthoritiesProvider));
    return provider;
}
Also used : DetectingSystemAuthoritiesProvider(org.hisp.dhis.security.authority.DetectingSystemAuthoritiesProvider) CompositeSystemAuthoritiesProvider(org.hisp.dhis.security.authority.CompositeSystemAuthoritiesProvider) AppsSystemAuthoritiesProvider(org.hisp.dhis.security.authority.AppsSystemAuthoritiesProvider) CachingSystemAuthoritiesProvider(org.hisp.dhis.security.authority.CachingSystemAuthoritiesProvider) SchemaAuthoritiesProvider(org.hisp.dhis.security.authority.SchemaAuthoritiesProvider) Primary(org.springframework.context.annotation.Primary) Bean(org.springframework.context.annotation.Bean)

Aggregations

AppsSystemAuthoritiesProvider (org.hisp.dhis.security.authority.AppsSystemAuthoritiesProvider)1 CachingSystemAuthoritiesProvider (org.hisp.dhis.security.authority.CachingSystemAuthoritiesProvider)1 CompositeSystemAuthoritiesProvider (org.hisp.dhis.security.authority.CompositeSystemAuthoritiesProvider)1 DetectingSystemAuthoritiesProvider (org.hisp.dhis.security.authority.DetectingSystemAuthoritiesProvider)1 SchemaAuthoritiesProvider (org.hisp.dhis.security.authority.SchemaAuthoritiesProvider)1 Bean (org.springframework.context.annotation.Bean)1 Primary (org.springframework.context.annotation.Primary)1