Page MenuHomePhabricator

Deprecate userCan Hook
Closed, ResolvedPublic

Description

2 identical hooks exist since 1.35: GetUserPermissionsErrors and GetUserPermissionsErrorsExpensive

There's 2 deployed extensions that still use userCan hook - they should be moved to either of the new hooks, depending on how expensive the checks are, and the userCan hook should be deprecated

  • extensions/JsonConfig
  • extensions/LiquidThreads

Event Timeline

Change 710599 had a related patch set uploaded (by TChin; author: TChin):

[mediawiki/extensions/JsonConfig@master] Replace UserCan hook with GetUserPermissionsErrors hook

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

Change 710601 had a related patch set uploaded (by TChin; author: TChin):

[mediawiki/extensions/LiquidThreads@master] Replace UserCan hook with GetUserPermissionsErrors hook

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

Change 710601 merged by jenkins-bot:

[mediawiki/extensions/LiquidThreads@master] Replace UserCan hook with GetUserPermissionsErrors hook

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

Change 710599 merged by jenkins-bot:

[mediawiki/extensions/JsonConfig@master] Replace UserCan hook with GetUserPermissionsErrors hook

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

Change 711657 had a related patch set uploaded (by TChin; author: TChin):

[mediawiki/core@master] Deprecate userCan hook

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

Change 711657 merged by jenkins-bot:

[mediawiki/core@master] Deprecate userCan hook

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

Shouldn't the UserCanHook interface be marked as deprecated?

Also, the release note and commit message merely says deprecated, but it has been added to DeprecatedHooks. Doesn't that mean it's hard-deprecated? That's an important difference for reusers.

You're right, it should be indicated to be hard-deprecated

Change 720754 had a related patch set uploaded (by TChin; author: TChin):

[mediawiki/core@master] Deprecate userCan hook

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

Change 720754 merged by jenkins-bot:

[mediawiki/core@master] Deprecate userCan hook

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