REST-API get permissions

13 views
Skip to first unread message

and...@medieninf.de

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

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.
Cheers

Rene Pfeuffer

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

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.

Regards
René
Reply all
Reply to author
Forward
0 new messages