authz: implement `PermsFetcher` interface for GitLab authz providers
Created by: unknwon
This PR implements PermsFetcher
interface for GitLab authz providers, both SudoProvider
and OAuthProvider
.
Notes
- Tests will be added in followup PRs once I run through the new permissions syncing process end-to-end.
- This PR does not change any functionality currently in use, safe to merge upon approvals.
- This PR explicitly mentions in
PermsFetcher
definition that implementations should return "partial but valid results in case of error". The rationales are:- API calls to code host are expensive.
- When a new user or repo just being added, there is literally no permissions, something (valid) is better than nothing. LMK any objections, if anyone thinks this will make debugging harder.
Implements #8492 (closed).