Page MenuHomePhabricator

Remove the 'edit' action from Block::appliesToRight()
Open, Stalled, LowPublic


A block does not necessarily prevent editing, but calling Block::prevents( 'edit' ) returns true.

Remove this code from Block::prevents()

case 'edit':
  # For now... <evil laugh>
  $res = true;

and remove any cases where Block::prevents() is being called with edit and hard-code it to true (i.e. User::isBlocked())

Event Timeline

dbarratt created this task.Nov 7 2018, 9:43 PM
Restricted Application added subscribers: MGChecker, Aklapper. · View Herald TranscriptNov 7 2018, 9:43 PM

David, is this blocking us resolving any other defects on our backlog?

David, is this blocking us resolving any other defects on our backlog?

Nope. Just some clean up that I didn't want to forget about. :)

TBolliger changed the task status from Open to Stalled.Nov 29 2018, 7:54 PM
TBolliger added a subscriber: Mooeypoo.

Blocked because @Mooeypoo will check with others to see how we should proceed with this task.

There is a documented process somewhere, but in short:

  1. Add a tag to the code (it should throw a warning in the console/logs)
  2. Send an email to wikitech-l
  3. After a few weeks, announce it again
  4. After a few more weeks, remove it

Because this is ~12 years old and an important piece of functionality (blocked users being able to edit is edit!).

We also need to fix all the instances of this method in Core.

aezell added a subscriber: aezell.EditedNov 29 2018, 7:54 PM

This is primarily a socialization task because this usage in the core code is quite small. Seems like this:

Or, here:

Or, this:

Mooeypoo removed Mooeypoo as the assignee of this task.May 6 2019, 4:54 PM

The 'prevents' method is dealt with and had an email sent to wikitech-l.

The "edit" right is now in appliesToRight, and should be dealt with there.

Mooeypoo renamed this task from Remove the 'edit' action from Block::prevents() to Remove the 'edit' action from Block::appliesToRight().May 6 2019, 4:54 PM