Page MenuHomePhabricator

Prepare a technical plan for Multi-blocks
Closed, ResolvedPublicAug 21 2018

Description

With T194697: Multiblocks — Allow for multiple, simultaneous blocks with different expiration dates on the near horizon, we will want to be prepared from a technical standpoint.

Questions to answer:
Acceptance criteria
  • The questions above are answered + documented on Phabricator
    • yes
  • Needed Phabricator tasks and sub-tasks are created
    • We have decided not to create Phabrictor tasks until after T199917 is completed.
  • The RFC process is started/updated
    • yep
Plan

Here's the plan we have come up with, assuming that T199917 has no changes.

Related Tickets:
T2674: Allow users to be blocked from editing a specific article or all articles inside a namespace


Structural Changes:

  • Draft a proposal for mutliblocks table schema(s) and get consensus T202322
  • Create Migration Plan from old schem to new schema (add links to ticket)
  • Create New schema for multiblocks
  • Create new classes in order to work with Multiblock in an abstracted way (and ensure all the existing tests pass)
    • Idea: Create BlockTarget that gets a block a target with all of the blocks.
    • Idea: Block "entry" is an existing Block class
    • Idea: Create a MergedBlock that returns all of the block entries merged together
    • New classes must understand and respond to current "Is this user blocked?" kind of request
      • There are two kinds of requests that do this: Pre-flight check or hard check.

Implementation Changes:

  • Update block notices (desktop, mobile, etc.)
    • Might be merged and then give more details (split into seperate entries), etc.
  • Update Special:BlockList with Block Entries
  • Update Block APIs
    • UserInfo should return a merged block
    • Blocks should return all of the block entries, perhaps in an order where the first one is the most restrictive (i.e. a sitewide block)? or perhaps the order doesn't matter
  • Update PHP APIs to create Multiblocks
  • Update API:Block to set Multiblocks
  • Update Special:Block and Special:Unblock to set and unset Multiblocks
  • Ensure that Autoblocks work properly
    • Copy all of the block settings?
    • New Target?
  • Update block logs with mutliblock details
  • Add Links to Special:Block (and the block notices?) to edit specific Block Entry on Special:Block
  • Remove old schema for single block

References:

Details

Due Date
Aug 21 2018, 3:59 AM

Event Timeline

@TBolliger Does this ticket involve splitting out T194697 into smaller tasks like we did for T2674?

Yes, I'd say so. I'll update the ticket.

dbarratt set Due Date to Aug 21 2018, 3:59 AM.Aug 20 2018, 6:01 PM
Restricted Application changed the subtype of this task from "Task" to "Deadline". · View Herald TranscriptAug 20 2018, 6:01 PM
dbarratt updated the task description. (Show Details)
dbarratt claimed this task.
dbarratt updated the task description. (Show Details)
dbarratt moved this task from Ready to Done on the Anti-Harassment (AHT Sprint 27) board.