Search in sources :

Example 1 with DefaultAuthorizationManager

use of eu.bcvsolutions.idm.core.security.service.impl.DefaultAuthorizationManager in project CzechIdMng by bcvsolutions.

the class DefaultAuthorizationManagerUnitTest method init.

@Before
public void init() {
    manager = new DefaultAuthorizationManager(context, service, securityService, moduleService);
    // 
    enabledPolicies = new ArrayList<>();
    // 
    IdmAuthorizationPolicyDto policyOne = new IdmAuthorizationPolicyDto();
    policyOne.setPermissions(IdmBasePermission.READ);
    policyOne.setEvaluator(evaluator.getClass());
    enabledPolicies.add(policyOne);
    // 
    IdmAuthorizationPolicyDto policyTwo = new IdmAuthorizationPolicyDto();
    policyTwo.setPermissions(IdmBasePermission.UPDATE);
    policyTwo.setEvaluator(evaluator.getClass());
    enabledPolicies.add(policyTwo);
}
Also used : DefaultAuthorizationManager(eu.bcvsolutions.idm.core.security.service.impl.DefaultAuthorizationManager) IdmAuthorizationPolicyDto(eu.bcvsolutions.idm.core.api.dto.IdmAuthorizationPolicyDto) Before(org.junit.Before)

Aggregations

IdmAuthorizationPolicyDto (eu.bcvsolutions.idm.core.api.dto.IdmAuthorizationPolicyDto)1 DefaultAuthorizationManager (eu.bcvsolutions.idm.core.security.service.impl.DefaultAuthorizationManager)1 Before (org.junit.Before)1