Page MenuHomePhabricator

Special:UserRights fails to allow users to remove their rights when it is specified in $wgGroupsRemoveFromSelf
Closed, ResolvedPublic

Description

T27319 allow anyone can enter it with read-only mode, but Now it looks like only a read-only mode.
In zh.wp., it have a consensus that users with some rights can remove the right by self, like the Patrollers ,Rollbackers ,etc.
Now I can't remove the rights now, just the read-only mode.
Is it something wrong?

1.PNG (547×802 px, 54 KB)

Event Timeline

Aklapper renamed this task from T27319 looks like something wrong. to After making Special:UserRights available to everyone, I can't remove other rights than the read-only mode.Dec 7 2016, 5:06 PM

I will investigate this. It is likely that the $canChangeAny value is incorrectly as false.

Can you please specify which of the three groups (IP Block Exemptions, Patrollers, Rollbackers) is the one that users can remove themselves from?

Never mind, I found out that all three of those group have been listed for zhwiki in the wgGroupsRemoveFromSelf variable per https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/InitialiseSettings.php#L12273

Moving on to replicating that in my local wiki.

My guess was correct; the $canChangeAny value will be false if your right remove is issued through the $wgGroupRemoveFromSelf variable. I will submit a patch shortly.

Huji renamed this task from After making Special:UserRights available to everyone, I can't remove other rights than the read-only mode to Special:UserRights fails to allow users to remove their rights when it is specified in $wgGroupsRemoveFromSelf.Dec 7 2016, 7:09 PM

Change 325820 had a related patch set uploaded (by Huji):
Special:Userrights should set isself on page view, not just on submit

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

Huji triaged this task as Medium priority.Dec 7 2016, 9:20 PM
Dereckson raised the priority of this task from Medium to High.Dec 8 2016, 3:04 PM
Dereckson subscribed.

Raising the priority as it breaks some workflows for some wikis.

Change 325964 had a related patch set uploaded (by Florianschmidtwelzow):
Special:Userrights should set isself on page view, not just on submit

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

@Dereckson or @Huji: Would you be able to be the contact for SWAT deployment?

Change 325820 merged by jenkins-bot:
Special:Userrights should set isself on page view, not just on submit

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

@Dereckson or @Huji: Would you be able to be the contact for SWAT deployment?

Sure.

Change 325964 merged by jenkins-bot:
Special:Userrights should set isself on page view, not just on submit

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

Mentioned in SAL (#wikimedia-operations) [2016-12-08T19:59:52Z] <thcipriani@tin> Synchronized php-1.29.0-wmf.5/includes/specials/SpecialUserrights.php: SWAT: [[gerrit:325964|Special:Userrights should set isself on page view, not just on submit]] T152600 (duration: 00m 45s)

@Cwek We've deployed the change.

In a few dozen of minutes, when wmf.5 will have reached zh.wikipedia (you can check that on Special:Version), you'll be able to check if all works well from your side and confirm to us it's well solved.

Update 20:35 UTC — wmf.5 is live on zh.wikipedia, so you can test this.

@Dereckson
It confirms at 8:52 UTC+8.
Thank you.