use of eu.bcvsolutions.idm.core.api.dto.IdmAuthorizationPolicyDto in project CzechIdMng by bcvsolutions.
the class BasePermissionEvaluatorUnitTest method testEvaluateAdminPermission.
@Test
public void testEvaluateAdminPermission() {
IdmAuthorizationPolicyDto policy = new IdmAuthorizationPolicyDto();
UUID uuid = UUID.randomUUID();
IdmRole authorizable = new IdmRole(uuid);
policy.setPermissions(IdmBasePermission.ADMIN);
//
assertTrue(evaluator.evaluate(authorizable, policy, IdmBasePermission.READ));
assertTrue(evaluator.evaluate(authorizable, policy, IdmBasePermission.UPDATE));
assertTrue(evaluator.evaluate(authorizable, policy, IdmBasePermission.ADMIN));
}
Aggregations