authz: make `provider` column nullable for perms table
Created by: unknwon
This PR makes the provider
column nullable in both user_permissions
and repo_permissions
tables, and delete uses of this column in the codebase.
The rationale here is that the repo_id
and user_id
we used in these two tables are our internal database ID, multiple authz providers are not possible to be associated with same repo_id
for a repository (e.g. repo A exists on GitHub, then it is no chance it exists on GitLab with same ExternalRepoSpec
).
The only gotcha however, multiple authz providers is more likely to be associated with same user_id
for a user, which impacts the RFC 113. This requires us to fetch from all authz providers when refreshing permissions in user-centric way (the the exact way we did in #8571).
Fixes #8608. The followup is to drop the column in 3.15.