code: @Override
      public boolean hasPermission(User user, E entity, Permission permission) {
  
          // always grant READ access to own user object (of the logged in user)
          if (user != null && user.equals(entity)
              && permission.equals(Permission.READ)) {
              LOG.trace("Granting READ access on own user object");
              return true;
          }
  
          // call parent implementation
          return super.hasPermission(user, entity, permission);
      }
docs: Grants READ permission on the user object of the currently logged in
  user. Uses default implementation otherwise.