@Override
    public AuthorizationResult evaluate(final AuthorizableResource resource, final AuthorizationRequest request) {
        val facade = new DefaultGrouperFacade();
        val assignments = facade.getPermissionAssignments(GrouperPermissionAssignmentsQuery.builder()
            .attributeDefinitionName(attributeDefinition)
            .roleName(roleName)
            .subjectId(request.getPrincipal().getId())
            .build());
        return assignments != null && assignments.getWsPermissionAssigns() != null
            && assignments.getWsPermissionAssigns().length > 0
            ? AuthorizationResult.granted("OK") : AuthorizationResult.denied("Denied");
    }
This is {@link RequiredGrouperPermissionsAuthorizationPolicy}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-heimdall/src/main/java/org/apereo/cas/heimdall/authorizer/resource/policy/RequiredGrouperPermissionsAuthorizationPolicy.java