Page MenuHomePhabricator

Convert EditConstraint system to use Authority
Closed, ResolvedPublic

Description

If a constraint has PermissionManager injected, instead we need to change it to accept Authority instead of User and remove PermissionManager dependency.

Calls to PermissionManager should be changed to corresponding calls to Authority.

Tests should be updated - no longer need to mock PermissionManager, but instead SimpleAuthority (with real UserIdentityValue, no need to mock it) with appropriate permissions should be passed.

Event Timeline

DannyS712 moved this task from Unsorted to Others on the User-DannyS712 board.
DannyS712 edited subscribers, added: DannyS712; removed: User-DannyS712.

Can I suggest waiting to do this until after https://gerrit.wikimedia.org/r/c/mediawiki/core/+/649916 is merged?

It's not urgent in any way. Should be trivial and quite independent though, so not necessary to block too much.

Change 667952 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] Convert EditConstraints to Authority

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

Change 667952 merged by jenkins-bot:
[mediawiki/core@master] Convert EditConstraints to Authority

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

Change 674116 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Update creation of edit constraints following switch to Authority

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

Change 674116 merged by jenkins-bot:
[mediawiki/core@master] Update creation of edit constraints following switch to Authority

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