Page MenuHomePhabricator

[keyserver] Run migration to populate special_role column for Admins
ClosedPublic

Authored by rohan on Nov 28 2023, 11:32 AM.
Tags
None
Referenced Files
F6177556: D10076.diff
Wed, Apr 23, 4:24 AM
Unknown Object (File)
Wed, Apr 9, 12:35 AM
Unknown Object (File)
Tue, Apr 8, 9:01 PM
Unknown Object (File)
Tue, Apr 8, 8:21 PM
Unknown Object (File)
Tue, Apr 1, 12:51 PM
Unknown Object (File)
Tue, Apr 1, 2:44 AM
Unknown Object (File)
Mon, Mar 31, 9:38 PM
Unknown Object (File)
Mon, Mar 31, 8:07 AM
Subscribers

Details

Summary

Now that we have a specialRoles.ADMIN_ROLE enum, we should populate existing Admins in MariaDB to have this value in their special_role field. Following D9974, we already support populating new Admin's special_role field, so we don't need to worry about that.

There are two decent ways to check for an Admins role, either by role.name === Admins or roleIsAdminRole. The latter is a little more difficult since it requires us to construct RoleInfo to pass it in roleIsAdminRole, and makes it overall difficult to do a simple UPDATE statement. That's why I opted to do it through the first method (checking name)>

Addresses ENG-5837

Depends on D10075

Test Plan

Checked the MariaDB table after the migration and confirmed the Admins roles had the special_role field

Diff Detail

Repository
rCOMM Comm
Branch
special_role
Lint
No Lint Coverage
Unit
No Test Coverage