REST-API get permissions

Skip to first unread message

Feb 25, 2021, 11:13:43 PMFeb 25
to scmmanager

i try to list the permissions of a user (basically which repos she or he is allowed to write to) with
  GET ​/v2​/users​/tu/permissions
but I do get for any test user an empty list. I expect to retrieve a list of all repos (or whatever way to retrieve this list in _links). Am I doing something fundamentally wrong?

Note, that I can retrieve all this information via the ​
   GET /v2​/repositories​/2021​/test​/permissions​/tu
without any problem.

Thanks for any help.

Rene Pfeuffer

Feb 26, 2021, 1:59:31 AMFeb 26
to scmmanager

at the moment you cannot get a consolidated list of repository permissions for a user. To a part this is due to the fact, that SCM-Manager cannot always determine the groups a user is member of (for example when you use an external authentication like LDAP), unless she is logged in.

Using /v2​/users​/<userid>/permissions, you will always get the global permissions set for the user. Repository specific permissions for groups or users are always available under /v2​/repositories​/<namespace>/<name>​/permissions​/.

Nonetheless we have this feature on our to-do list, so keep your eyes open.

Reply all
Reply to author
0 new messages