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
F1797214: D10076.diff
Sun, May 19, 8:49 PM
Unknown Object (File)
Apr 8 2024, 10:35 PM
Unknown Object (File)
Apr 8 2024, 10:35 PM
Unknown Object (File)
Apr 8 2024, 10:35 PM
Unknown Object (File)
Apr 8 2024, 10:35 PM
Unknown Object (File)
Feb 20 2024, 7:54 PM
Unknown Object (File)
Feb 20 2024, 1:24 PM
Unknown Object (File)
Feb 20 2024, 1:23 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable