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?

Event Timeline

Cwek created this task.Dec 7 2016, 12:59 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 7 2016, 12:59 PM
Kegns added a subscriber: Kegns.Dec 7 2016, 4:44 PM
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
Krenair assigned this task to Huji.Dec 7 2016, 5:08 PM
Huji added a comment.EditedDec 7 2016, 6:09 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?

Huji added a comment.Dec 7 2016, 6:31 PM

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.

Huji added a comment.Dec 7 2016, 6:46 PM

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 Normal priority.Dec 7 2016, 9:20 PM
Dereckson raised the priority of this task from Normal to High.Dec 8 2016, 3:04 PM
Dereckson added a subscriber: Dereckson.

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

Florian added a subscriber: Florian.Dec 8 2016, 5:55 PM

@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)

Dereckson added a comment.EditedDec 8 2016, 8:01 PM

@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.

Cwek added a comment.Dec 9 2016, 12:57 AM

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

Cwek awarded a token.Dec 9 2016, 12:58 AM
Florian closed this task as Resolved.Dec 9 2016, 7:59 AM

great :D