Page MenuHomePhabricator

Update User::isAllowed() to check the user's block with Block::prevents()
Closed, DeclinedPublic2 Estimate Story Points

Description

A lot of extensions use User::isBlocked() to see if a user should be granted access to the extension. This should check the block on a permission-level to ensure that the user does in fact have access. The block can pass (return null) if it does not make an explicit decision either way.

Event Timeline

dbarratt created this task.Nov 2 2018, 4:47 AM
dbarratt updated the task description. (Show Details)
dbarratt renamed this task from Update User::getRoles() to also check that a block is sitewide to Update User::getRights() to also check that a block is sitewide.Nov 2 2018, 4:55 AM
dbarratt updated the task description. (Show Details)

Change 471210 had a related patch set uploaded (by Dbarratt; owner: Dbarratt):
[mediawiki/core@master] Update User::getRights() to also check that a block is sitewide

https://gerrit.wikimedia.org/r/471210

TBolliger set the point value for this task to 2.Nov 2 2018, 6:15 PM
dmaza assigned this task to dbarratt.Nov 5 2018, 4:32 PM
dmaza moved this task from Ready to Review on the Anti-Harassment (AHT Sprint 32) board.
dbarratt renamed this task from Update User::getRights() to also check that a block is sitewide to Update User::isAllowed() to check the user's block with Block::prevents().Nov 6 2018, 11:12 PM
dbarratt updated the task description. (Show Details)

Change 471210 abandoned by Dbarratt:
Update User::isAllowed() to also check that a block does not prevent the user's actions.

Reason:
After a lot of discussion, we are abandoning this patch and defering how to deal with blocks to the extensions themselves.

https://gerrit.wikimedia.org/r/471210

dbarratt closed this task as Declined.Nov 7 2018, 9:02 PM
dbarratt moved this task from Review to Done on the Anti-Harassment (AHT Sprint 32) board.

After much discussion, we've decided that it is best to let extensions deal with partial blocks themselves.

I've created T209003 to hopefully be able to do this in the future.

TBolliger triaged this task as Low priority.Nov 19 2018, 10:06 PM