code: public boolean hasPermission(Authentication authentication,
                                   Object resource,
                                   Object privilege) {
          boolean logPermission = isLogPermission(resource);
          return checkRole(authentication, privilege, logPermission)
              || checkPermission(authentication, resource, privilege, true, logPermission);
      }
docs: Check permission for role, privilege key and resource condition.
  @param authentication the authentication
  @param resource the resource
  @param privilege the privilege key
  @return true if permitted