Page MenuHomePhabricator

Error adding groups when user cannot modify an existing group membership
Closed, ResolvedPublic

Description

I have an account on TheTestWiki.org. On that wiki, there is a "test" user group that allows admins to test adding and removing rights through Special:UserRights. However, when I tried to add the "test" group to my account on that wiki, I kept getting an error message that said "the expiry time for group "sysop" is invalid". My account has indefinite sysop rights on that wiki, and I didn't touch the sysop right when attempting to add the test group. This is weird, and the owner of the wiki says that it's a MediaWiki issue. See the screenshot below.

IMG_0340.PNG (1×2 px, 278 KB)

Event Timeline

Catalan triaged this task as Medium priority.Jul 21 2017, 7:59 PM

Confirmed with the following configuration settings on MediaWiki-Vagrant:

$wgGroupPermissions['test']['read'] = true;
$wgGroupsAddToSelf['sysop'][] = 'test';
$wgGroupsRemoveFromSelf['sysop'] = true;

Adding the third line seems to do the trick. If it is disabled, adding and removing rights functions fine.

Skizzerz renamed this task from Error while setting user groups on TheTestWiki.org to Error adding groups when user cannot modify an existing group membership.Jul 23 2017, 4:10 AM
Skizzerz claimed this task.

Patch pending review at https://gerrit.wikimedia.org/r/#/c/367128/ -- would appreciate if someone could give it a look over

Change 367128 had a related patch set uploaded (by Legoktm; owner: Skizzerz):
[mediawiki/core@master] Fix issue when modifying groups in Special:Userrights

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

Change 367128 merged by jenkins-bot:
[mediawiki/core@master] Fix issue when modifying groups in Special:Userrights

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