Inconsistent permissions for accessing private snippets

Problem

Snippets explore feature (https://gitlab.com/explore/snippets) allows admin and auditor role to see private snippets of other users.

However, the Snippet API list endpoint (api/v4/snippets) is restricted to show only personal or public snippets for admin and auditors. But it works for private snippets if we request them directly by id (api/v4/snippets/25).

Proposal

  • Match the behavior between the GitLab UI and the API functionality.
  • Update the documentation

Related issues:

  • Expose all snippets to /snippets endpoint for G... (#212729)
  • Snippets should be able to be reported as spam (#209005)
Edited Jan 10, 2023 by Vasilii Iakliushin
Assignee Loading
Time tracking Loading