protected boolean validateResourceSetScopes(final ResourceSet rs) {
        return rs.getPolicies() == null || rs.getPolicies().isEmpty() || rs.getPolicies()
            .stream()
            .flatMap(policy -> policy.getPermissions().stream())
            .allMatch(permission -> rs.getScopes().containsAll(permission.getScopes()));
    }
Validate resource set scopes.

@param rs the rs
@return true/false
support/cas-server-support-oauth-uma-core/src/main/java/org/apereo/cas/uma/ticket/resource/repository/BaseResourceSetRepository.java