Page MenuHomePhabricator

Remove UserRightsProxy and replace it's usages with UserGroupManager
Open, Needs TriagePublic


The UserRightsProxy was used to get/set groups for the users in foreign wikis. We need to remove all usages of this class, since now the correct way of accessing groups for users in the foreign wikis is to use UserGroupManagerFactory to create a manager pointing to the correct domain.

Event Timeline

Note: In deployed code, it is only used in core, meaning that it should be possible to hard deprecate entirely in 1.35 if we moved fast

The crazy part there is that the only place it's returned from is UserrightPage::fetchUser which is overridden by SpecialGlobalGroupMembership from CentralAuth, that can return CentralAuthGroupMembershipProxy. So it's a bit trickier then it sounds..

It may be useful to make UserRIghtsProxy implement UserIdentity. This way, we can just start passing $user to UserGroupManager without worrying about whether it's a User or a UserRightsProxy. Then we can make the constructor of UserrightsProxy emit deprecation warnings.

Change 714584 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@master] Make UserRightsProxy implement UserIdentity

Change 714584 merged by jenkins-bot:

[mediawiki/core@master] Make UserRightsProxy implement UserIdentity