code: public CompletableFuture<Collection<Permission>> findPermissions(String projectName, String repoName,
                                                                       User user) {
          requireNonNull(user, "user");
          if (user.isAdmin()) {
              return CompletableFuture.completedFuture(PerRolePermissions.ALL_PERMISSION);
          }
          if (user instanceof UserWithToken) {
              return findPermissions(projectName, repoName, ((UserWithToken) user).token().appId());
          } else {
              return findPermissions0(projectName, repoName, user);
          }
      }
docs: Finds {@link Permission}s which belong to the specified {@link User} or {@link UserWithToken}
  from the specified {@code repoName} in the specified {@code projectName}.