private AuthorizationResult authorize(Set<String> callerRoles, StandardRole... roles) {
   for (StandardRole role : roles) {
     if (callerRoles.contains(role.toString())) {
       return AuthorizationResult.PERMITTED;
     }
   }
   return new AuthorizationResult(Decision.DENY);
 }
Ejemplo n.º 2
0
 private String roleToUserName(StandardRole role) {
   return TEST_USER + "_" + role.toString();
 }