RFC 113: Implement `PermsFetcher` interface for Bitbucket Server authz provider
Created by: unknwon
Essentially, add two methods to Bitbucket Server authz provider: enterprise/cmd/frontend/internal/authz/bitbucketserver
An example implementation for GitLab can be found at https://github.com/sourcegraph/sourcegraph/blob/master/enterprise/cmd/frontend/internal/authz/gitlab/sudo.go
Things to note
- Return partial but valid results whenever possible.
- When fetch in user-centric:
- Impersonate/fetch via username
- The username as the
extsvc.ExternalAccountID
for results.
- When fetch in repo-centric:
2. The repo ID as the
extsvc.ExternalRepoID
for results. 3. There are two candidate APIs to use: - https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html#idm8297380432 - https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html#idm8283203728 (we have a method for this endpoint already)
Let me know when you have any questions!