Enable site admins access to all repositories
Created by: beyang
Allow site admins to bypass code host repository permission checks.
Currently, we can get into a state where, if a user is added without initialRepositoryEnablement=true
, a non-admin user will not be able to enable the repository. If an admin user doesn't have an external user account with the code host that has access to the repository, the admin will also not be able to enable the repository. So the repository will be forever stuck in a limbo state of inaccessibility unless someone manually changes the DB row to set the repo to be enabled.
This also is the case in the converse: site admins also may not be able to disable repositories that have enabled if their user is not associated with an external user that has access to the repository.
Sourcegraph site admins should have access to all repositories on the Sourcegraph instance.