Page MenuHomePhabricator

Create common interface for User, UserRightsProxy, and CentralAuthGroupMembershipProxy
Closed, DeclinedPublic

Description

The code of Special:UserRights misleadingly implies that we're performing actions upon a User object, when in reality it could be a UserRightsProxy or a CentralAuthGroupMembershipProxy, which just happen to have the same functions. We should create a common interface for those functions and explicitly specify through documentation and type hinting that that interface is being used rather than blindly assuming User.

The real goal of this refactoring and cleanup is to ensure that bugs like T88505 don't happen again.

Event Timeline

Legoktm claimed this task.
Legoktm raised the priority of this task from to Medium.
Legoktm updated the task description. (Show Details)
Legoktm subscribed.
gerritbot subscribed.

Change 188516 had a related patch set uploaded (by Legoktm):
Add common interface for User and UserRightsProxy

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

Patch-For-Review

Change 188516 abandoned by Legoktm:
Add common interface for User and UserRightsProxy

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

Change 188516 restored by TTO:
Add common interface for User and UserRightsProxy

Reason:
This seems like an important precursor to T12493

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

Change 328462 had a related patch set uploaded (by TTO):
Make CentralAuthGroupMembershipProxy implement UserGroupMember

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

Change 188516 abandoned by Legoktm:
Add common interface for User and UserRightsProxy

Reason:
Likely not necessary now that UserGroupMembership class exists.

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

Change 328462 abandoned by Thiemo Kreuz (WMDE):
Make CentralAuthGroupMembershipProxy implement UserGroupMember

Reason:
The core change got abandoned. I don't think this applies any more. If it does, it can easily be recreated or reopened.

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

@TTO: Hi, all related patches in Gerrit have been abandoned. Do you still plan to work on this? Asking as you are set as task assignee. Thanks in advance!

Aklapper removed TTO as the assignee of this task.Mar 31 2020, 2:39 PM
Aklapper added a subscriber: TTO.

@TTO: I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome. Thanks for your understanding!

I suppose this should be declined in favour of T255309?

Yeah, though the intent of this bug was satisfied, which was to get rid of the fake interface that wasn't an interface between the various User/UserRightsProxy/etc. objects.