API Feature: List group projects with authenticated user permissions

Problem to solve

External API services should be able to get the permission of the user making a request when listing repositories. Currently it's only possible to get a user's permission on a project by getting that specific project in a separate call to the API.

With this proposed with_permissions parameter, external API services could get the permissions to check if access to a certain project/group is granted in the GitLab instance and to what extend permissions are granted.

Example API usage

https://gitlab.com/api/v4/groups?with_permissions=true

The parameter would be a simple boolean to specify if the response contains or not the permissions for the projects

For this example, the API would return the projects in a way similar to the https://gitlab.com/api/v4/projects/:id endpoint, which also includes a permissions object such as

"permissions" : { "projectAccess" : { "accessLevel" : 50, "notificationLevel" : 3 }, "groupAccess" : { "accessLevel" : 50, "notificationLevel" : 3 } }

Use cases

  • All applications, which want to, in some way get access to all repositories and the authenticated user's permission on said repositories
Edited by 🤖 GitLab Bot 🤖