Ensure that admins don't lose their global role

This fix adresses this comment by @rkemper:

the current implementation wipes out the Global roles for all users in favor of just the project-scoped one. This was intended so that we're actually properly using LDAP as a source of truth and not letting people with legacy access maintain their access beyond what LDAP permits.

This is probably the right behavior for non-admin users, but it's definitely not correct for Admin, since running the staging script wiped out my (and the other admins') global access, which I restored manually via curling w/ the API key.

We definitely need Admins to keep their access. There's an open question as to whether for non-admin groups we either (a) wipe their global access, or (b) keep whatever they currently have. (The main risk here is if somebody has elevated access globally but a less permissive project role, they'll end up with more access than they should have)

Signed-off-by: Balthazar Rouberol brouberol@wikimedia.org Bug: T420691

Edited by Brouberol

Merge request reports

Loading