Page MenuHomePhabricator

Experiment with converting action API modules to Authority
Closed, ResolvedPublic


After Authority is available from IContextSource T271460 we can try converting a ApiBase and action API modules to using it instead of PermissionManager.

Event Timeline

CCicalese_WMF renamed this task from Experiment with converting some action API modules to Authority to Experiment with converting action API modules to Authority.Jan 21 2021, 2:40 PM
CCicalese_WMF updated the task description. (Show Details)

Change 655438 had a related patch set uploaded (by Cicalese; owner: Cicalese):
[mediawiki/core@master] EXPERIMENT Use Authority in Action API

An experimental patch ( converts the bulk of the Action API code to use Authority rather than PermissionManager.

The ApiCheckCanExecute hook still needs to be converted to use Authority rather than User.

The remaining usages of PermissionManager in the Action API code are calls to the following functions: isBlockedFrom(), isEveryoneAllowed( 'read' ), getAllPermissions(), and getUserPermissions(). In addition, in the tests, addTemporaryUserRights() and invalidateUserRightsCache() are called.

There are also calls to a couple of other core functions external to the Action API that should take Authority rather then User eventually: ChangeTags::canAddTagsAccompanyingChange() and MovePage::checkPermissions().

Change 655438 merged by jenkins-bot:
[mediawiki/core@master] Use Authority and GroupPermissionLookup in Action API