Page MenuHomePhabricator

Run emptyUserGroup on the beta cluster (again)
Closed, ResolvedPublic

Description

See previous requests at T248547: Run emptyUserGroup on the beta cluster (again) and T241504: Run emptyUserGroup on the beta cluster

Identified on beta enwiki:

Identified on beta commonswiki

Note that import is the correct group name

Commands for the groups
mwscript emptyUserGroup.php --wiki=enwiki test1
mwscript emptyUserGroup.php --wiki=enwiki test2

mwscript emptyUserGroup.php --wiki=commonswiki extended-uploader
mwscript emptyUserGroup.php --wiki=commonswiki importer
mwscript emptyUserGroup.php --wiki=commonswiki importers

Additionally, https://en.wikipedia.beta.wmflabs.org/wiki/Special:UserRights/Reviewer includes the --force group. Testing locally, it appears that, with the current emptyUserGroup expecting the group name to be an unnamed argument, it is impossible to specify that --force is the name of the group, rather than a parameter being passed to the script. As a result, as far as I can tell the only way to remove the group is manually updating the user groups via eval.php

Manual plan for the user
mwscript eval.php --wiki=enwiki
$u = User::newFromName( 'Reviewer' );
$u->removeGroup( '--force' );

Yes, User::removeGroup is deprecated, but its easier to use here than to try and interact with the services needed directly.

Event Timeline

Restricted Application added a project: User-DannyS712. · View Herald TranscriptJun 28 2020, 5:00 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
DannyS712 triaged this task as Lowest priority.Jun 28 2020, 5:01 AM
DannyS712 moved this task from Unsorted to Later on the User-DannyS712 board.
DannyS712 added subscribers: MarcoAurelio, Krinkle, Reedy.

Self-assigning, but since I haven't run maintenance scripts on the beta cluster before (only locally on my test wiki) will wait until someone more experienced agrees that these are the correct commands to use. CC @Krinkle (granted me the rights on the beta cluster) and @Reedy @MarcoAurelio (who actioned the previous tasks) to take a look

Can you also remove members from all groups in deploymentwiki (T198673)? This includes everything that is available in the interface to modify plus at least autopatrolled, flood and translationadmin which can't be modified via Special:UserRights as they do not exist there.

Can you also remove members from all groups in deploymentwiki (T198673)? This includes everything that is available in the interface to modify plus at least autopatrolled, flood and translationadmin which can't be modified via Special:UserRights as they do not exist there.

I'll do what I can via the interface, and the rest should be done as part of T198673 or a subtask

Reedy closed this task as Resolved.Jun 28 2020, 1:36 PM

It seems pointless removing people from groups if the wiki is just going to be removed

reedy@deployment-deploy01:~$ mwscript emptyUserGroup.php --wiki=enwiki test1
Removing 1 users from test1... Done!
reedy@deployment-deploy01:~$ mwscript emptyUserGroup.php --wiki=enwiki test2
Removing 1 users from test2... Done!
reedy@deployment-deploy01:~$ 
reedy@deployment-deploy01:~$ mwscript emptyUserGroup.php --wiki=commonswiki extended-uploader
Removing 2 users from extended-uploader... Done!
reedy@deployment-deploy01:~$ mwscript emptyUserGroup.php --wiki=commonswiki importer
Removing 1 users from importer... Done!
reedy@deployment-deploy01:~$ mwscript emptyUserGroup.php --wiki=commonswiki importers
Removing 1 users from importers... Done!
reedy@deployment-deploy01:~$

and

reedy@deployment-deploy01:~$ mwscript eval.php enwiki
> $u = User::newFromName( 'Reviewer' );

> $u->removeGroup( '--force' );
Reedy claimed this task.Jun 28 2020, 1:37 PM