Page MenuHomePhabricator

Update User::isAllowed() to check the user's block with Block::prevents()
Closed, DeclinedPublic2 Estimated 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 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
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 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.