Page MenuHomePhabricator

Add columns to globalblocks table to support merging CentralAuth locks into GlobalBlocking
Open, MediumPublic

Description

Summary

T373388: Replace CentralAuth account locks with GlobalBlocking global blocks asks for GlobalBlocking global blocks to replace MediaWiki-extensions-CentralAuth locking and lock-hiding. This task is to update the globalblock table schema to support this

Background

  • MediaWiki-extensions-CentralAuth locks currently can:
    • Prevent login and force the user to be logged out (locking)
    • Hide the user just from global lists or suppress them on all wikis
    • Disallow local wiki admins from being able to undo the global action just on their wiki
  • Therefore, GlobalBlocking blocks need to optionally have the above properties
    • A WMF steward asked that it should be possible to disallow local admins from disabling a global block for more than just account locks, so this needs to be distinct from whether an account is locked
    • A WMF steward also said that globally suppressed accounts probably never need to be logged into

Proposed schema

First proposal (preferred)

I'd propose adding three new columns named gb_allow_local_disable, gb_lock, and gb_hidden_level which are all mwtinyint:

> describe globalblocks;
+------------------------+------------------+------+-----+---------+----------------+
| Field                  | Type             | Null | Key | Default | Extra          |
+------------------------+------------------+------+-----+---------+----------------+
...
| gb_allow_local_disable | tinyint(1)       | NO   |     | 1       |                |
| gb_lock                | tinyint(1)       | NO   |     | 0       |                |
| gb_hidden_level        | tinyint(1)       | NO   |     | 0       |                |
+------------------------+------------------+------+-----+---------+----------------+

Second proposal (alternative)

If adding three additional columns isn't ideal / possible, then perhaps we could use bit flags? Something like gb_flags which is a smallint and stores this information (and maybe replacing other tinyint fields too)?

Acceptance criteria

Event Timeline

Dreamy_Jazz moved this task from Unsorted to Add / Create on the Schema-change board.
Dreamy_Jazz moved this task from Backlog to Proposed Projects on the Wikimedia-Hackathon-2026 board.

Working on this at the Wikimedia-Hackathon-2026, but no rush for DBA approval / review as we do not have short-term plans to implement the code changes for this

Marostegui triaged this task as Medium priority.May 4 2026, 9:59 AM
Marostegui moved this task from Triage to Pending comment on the DBA board.
Marostegui added a subscriber: Ladsgroup.