Page MenuHomePhabricator

Revision::userCanBitfield falls back to $wgUser
Closed, ResolvedPublic

Description

But, rather than deprecating just not passing a user, the whole function should be deprecated as part of MCR migration to RevisionRecord, which already requires a user for the equivalent function

Event Timeline

Change 574253 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hard deprecate Revision::userCanBitfield

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

DannyS712 moved this task from Unsorted to Awaiting review and deployment on the User-DannyS712 board.

Callers that accepted a null user and relied on the fallback to $wgUser had fallbacks added individually, and support for not passing a user soft deprecated. To fix:

  • Revision::userCan
  • ArchivedFile::userCan
  • OldLocalFile::userCan

Change 574253 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate Revision::userCanBitfield

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

This patch soft deprecated not providing a user to callers, since they need a user. The following methods now use $wgUser as a fallback (previously the fallback was within userCanBitfield)

  • Revision::userCan
  • ArchivedFile::userCan
  • OldLocalFile::userCan