static AccessPredicate hasAnyRole(final Collection<String> roles) {
        requireNonNull(roles, "roles");
        roles.forEach(role -> requireNonNull(role, "role"));
        final Set<String> immutableRoles = ImmutableSet.copyOf(roles);
        return (a, c) -> {
            for (final GrantedAuthority authority : a.getAuthorities()) {
                if (immutableRoles.contains(authority.getAuthority())) {
                    return true;
                }
            }
            return false;
        };
    }
Only those who have any of the given roles can access the protected instance.

@param roles The roles to check for.
@return A newly created AccessPredicate that only returns true, if the name of the {@link GrantedAuthority}s
        matches any of the given role names.
grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/security/check/AccessPredicate.java