Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket Server REST Api - Get the calling users project permissions

Chris Turner February 6, 2020

Hi, 

I'm building integration for Bitbucket Server into an application and I need to retrieve all the projects a user has access to, along with what level of access they have. The caller in this case is the authenticated user. 

This endpoint will let me find out what permission the user has at the user level with the caveat that they have the PROJECT_ADMIN permissions 

https://docs.atlassian.com/bitbucket-server/rest/6.10.0/bitbucket-rest.html#idp159

This isn't quite what I need, as I need the calling user to be able to know what permissions they have on the project. For example I've logged in as a user with PROJECT_READ I won't be able to call the above endpoint as I'll get a 401; Do I then use that as an indication that they only have read access?

This seems a bit hacky. Is there an alternative method I can use? 

 

Kind regards, 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events