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); }
private String roleToUserName(StandardRole role) { return TEST_USER + "_" + role.toString(); }