Hello Bitbucket Support Team,
We are currently migrating away from the deprecated API:
GET /2.0/user/permissions/repositories
This endpoint was previously used to retrieve the list of repositories that the authenticated user has access to, along with the user’s effective permission (admin/write/read), across all workspaces.
As per the documentation, the recommended replacement is the workspace-scoped API:
GET /2.0/workspaces/{workspace}/permissions/repositories
However, we have observed the following behaviour
The new workspace-scoped permissions API can only be accessed by users who have admin permission on the workspace.
When the authenticated user has only write or read permission on a workspace, the API returns an access error and does not allow retrieving repository permissions.
This makes it difficult to replicate the behaviour of the deprecated endpoint, which worked for all permission levels and returned only the repositories the current user had access to.
What is the recommended approach to retrieve the current user’s repository permissions (admin/write/read) across workspaces when the user is not a workspace admin?