Page MenuHomePhabricator

Special:UserRights for cross wiki rights management no longer allows changing expiration
Closed, ResolvedPublic

Description

Special:UserRights is no longer allowing to extend an userright without removing the relevant right first, when changing user rights for users on foreign wikis. A notification is triggered saying the rights were successfully changed, but nothing does change, and no log is generated either.

I tried multiple times, using the predefined "1 year", or by manually inserting a one-year time.

Earlier this year @Urbanecm managed to do it for the same user, so something changed in the meantime:

14:03, 13 April 2020 Martin Urbanec (A/S) talk contribs block changed group membership for Gcd822@kowikiversity from administrator (temporary, until 17:42, 13 April 2020) to administrator (temporary, until 14:03, 13 October 2020) (per request: renew) (thank)

Current expiration time: Member of: Administrators (until 14:03, 13 October 2020)

Event Timeline

@Tks4Fish I could not reproduce this on mediawiki.org for a local user.

16:49, 30 September 2020 DannyS712 talk contribs changed group membership for DannyS712 test from autopatroller (temporary, until 16:49, 7 October 2020) to autopatroller (testing T264214)

16:49, 30 September 2020 DannyS712 talk contribs changed group membership for DannyS712 test from autopatroller (temporary, until 16:49, 1 October 2020) to autopatroller (temporary, until 16:49, 7 October 2020) (Testing T264214)

16:49, 30 September 2020 DannyS712 talk contribs changed group membership for DannyS712 test from autopatroller to autopatroller (temporary, until 16:49, 1 October 2020) (testing T264214)

But, on the beta cluster (when I can change interwiki user rights) I was unable to change the expiration of user rights on other wikis without first removing the rights.

DannyS712 renamed this task from Special:UserRights no longer allows to extend right without removing it first to Special:UserRights for cross wiki rights management no longer allows changing expiration.Sep 30 2020, 4:53 PM
DannyS712 updated the task description. (Show Details)

thanks to some help from @Urbanecm with debugging, I think the issue is that the expiration isn't detected as changing, based on the debug results from the old user group memberships and the new ones having the same expiration time.

WhitePhosphorus subscribed.

Based on debugging logs on my local wiki, this is because UserRightsProxy::addGroup is not allowed to update existing user groups (see this line) while User::addGroup can do so, changed in this commit. So just doing the same thing as the aforementioned commit for UserRightsProxy will be a fix. I'll figure out if there are any side effects and submit a patch soon.

Change 663382 had a related patch set uploaded (by WhitePhosphorus; owner: WhitePhosphorus):
[mediawiki/core@master] Followups for UserGroupManager

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

Change 663382 merged by jenkins-bot:

[mediawiki/core@master] Followups for UserGroupManager

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

1.37.0-wmf.4 has been deployed on meta.

Change 685598 had a related patch set uploaded (by Reedy; author: WhitePhosphorus):

[mediawiki/core@REL1_36] Followups for UserGroupManager

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

Change 685599 had a related patch set uploaded (by Reedy; author: WhitePhosphorus):

[mediawiki/core@REL1_35] Followups for UserGroupManager

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

Change 685599 merged by jenkins-bot:

[mediawiki/core@REL1_35] Followups for UserGroupManager

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

Change 685598 merged by jenkins-bot:

[mediawiki/core@REL1_36] Followups for UserGroupManager

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