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
- The database schema is agreed
- The database schema changes are merged into the master branch of GlobalBlocking
- A Schema-change-in-production ticket is filed to apply the changes to WMF wikis