Interface RecentlyAccessedRepositoriesService


public interface RecentlyAccessedRepositoriesService
Provides a history of repositories users have browsed.
  • Method Details

    • findByCurrentUser

      @Nonnull Page<Repository> findByCurrentUser(@Nonnull PageRequest pageRequest)
      Returns a page of repositories accessed most recently by the current user. The list is ordered most recent to least recent. Only repositories the user can currently access are returned.

      This method provides exactly the same result as findByCurrentUser(Permission, PageRequest) invoked with Permission.REPO_READ.

      Parameters:
      pageRequest - describes the page of recently accessed repositories to retrieve
      Returns:
      page of repositories recently accessed by the current user
      Throws:
      AuthorisationException - if there is no current effective user
      See Also:
    • findByCurrentUser

      @Nonnull Page<Repository> findByCurrentUser(@Nonnull Permission permission, @Nonnull PageRequest pageRequest)
      Returns a page of repositories accessed most recently by the current user. The list is ordered most recent to least recent. Only repositories the user can currently access at the level specified by permission are returned.
      Parameters:
      permission - the permission that the effective user has to have with regards to the returned repositories. The permission has to be repository-related
      pageRequest - describes the page of recently accessed repositories to retrieve
      Returns:
      page of repositories recently accessed by the current user
      Throws:
      AuthorisationException - if there is no current effective user
      ArgumentValidationException - if the permission is not related to repository