Stop the operator seed re-granting revoked platform rights

FixInitializerService
Shipped
September 6, 2026 at 6:51 AM UTC
Author
Kamo
Commit
51ae3d0

Rights taken away from a platform administrator on Platform Admins came back on their own days later, which read from the console as a save that would not stick. They were not coming back from the console: granted_by_member_id was NULL on every restored row, and a console save always stamps its author. They were coming back from here. seedOperator granted every right in PlatformRightType.ALL that the operator did not currently hold, so each run of the initializer — one per schema change, by hand — re-asserted the full set over whatever an operator had deliberately revoked. The paired timestamps say it plainly: sage and erik picked up MANAGE_REPORTS 75ms apart on 2026-09-01 and MANAGE_USERS 65ms apart on 2026-09-04, both unattributed. "Skip a right they already hold" makes a statement idempotent, which is not the same as making it non-destructive. The run that creates the row is now the only run that grants; after that the console owns the set. The bootstrap survives, because it only ever mattered on a database with no rows yet — and nothing rests on it either way, since the top-level organization's owner resolves to every platform right without a row here at all.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing