code: public <T> Page<T> findAll(Pageable pageable, Class<T> entityClass, String privilegeKey) {
          String selectSql = format(SELECT_ALL_SQL, entityClass.getSimpleName());
          String countSql = format(COUNT_ALL_SQL, entityClass.getSimpleName());
  
          String permittedCondition = createPermissionCondition(privilegeKey);
          if (StringUtils.isNotBlank(permittedCondition)) {
              selectSql += WHERE_SQL + permittedCondition;
              countSql += WHERE_SQL + permittedCondition;
          }
  
          log.debug("Executing SQL '{}'", selectSql);
  
          return execute(createCountQuery(countSql), pageable, createSelectQuery(selectSql, pageable, entityClass));
      }
docs: Find all pageable permitted entities.
  @param pageable the page info
  @param entityClass the entity class to get
  @param privilegeKey the privilege key for permission lookup
  @param <T> the type of entity
  @return page of permitted entities