Page MenuHomePhabricator

Remove EP-related user groups on uninstall
Closed, ResolvedPublic

Description

To avoid already known issues of accounts still holding "ghost" permissions when an extension is disabled, EP-related rights shall be removed either before removing the extension from the wiki (ideal) or after. If you do that after, the only way is to do so via an SQL query. Thanks.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 2 2018, 9:06 PM
Reedy added a subscriber: Reedy.Jul 26 2018, 12:24 AM

Do we have a nice way of doing this in bulk?

I see migrateUserGroup.php but nothing for "deleting" or "emptying" user groups

Reedy renamed this task from Remove EP-related userrights on uninstall to Remove EP-related user groups on uninstall.Jul 27 2018, 12:44 PM
Reedy closed this task as Declined.Sep 25 2018, 11:10 PM

Extension is being removed and archived.

Reedy reopened this task as Open.Sep 27 2018, 3:21 PM

Still want to do this one, lol

#!/bin/bash
wikis="arwiki cawiki cswiki dewikiversity elwiki enwiki enwikinews eswiki fawiki frwikisource hewiki hewiktionary itwikiversity lvwiki mkwiki nlwiki ptwiki ruwiki srwiki svwiki ukwiki legalteamwiki"
groups="eponline epcampus epinstructor epcoordinator"
for db in ${wikis[@]}; do
   for group in ${groups[@]}; do
      mwscript emptyUserGroup.php --wiki=$db $group
   done
done

Found that this is still pending at https://nl.wikipedia.org/wiki/Speciaal:Gebruikerslijst?group=eponline (and I guess all other wikis too)

Can the script created at T185989: Create a MediaWiki maintenance script to mass remove users from a given user group be a solution here?

Thanks.

Reedy closed this task as Resolved.Dec 19 2018, 4:50 PM
Reedy claimed this task.

Still want to do this one, lol

#!/bin/bash
wikis="arwiki cawiki cswiki dewikiversity elwiki enwiki enwikinews eswiki fawiki frwikisource hewiki hewiktionary itwikiversity lvwiki mkwiki nlwiki ptwiki ruwiki srwiki svwiki ukwiki legalteamwiki"
groups="eponline epcampus epinstructor epcoordinator"
for db in ${wikis[@]}; do
   for group in ${groups[@]}; do
      mwscript emptyUserGroup.php --wiki=$db $group
   done
done

Run it, should've put an echo $db but meh

reedy@deploy1001:~$ ./rmEP.sh 
Removing 0 users from eponline... Done!
Removing 0 users from epcampus... Done!
Removing 0 users from epinstructor... Done!
Removing 0 users from epcoordinator... Done!
Removing 0 users from eponline... Done!
Removing 0 users from epcampus... Done!
Removing 0 users from epinstructor... Done!
Removing 0 users from epcoordinator... Done!
Removing 0 users from eponline... Done!
Removing 0 users from epcampus... Done!
Removing 0 users from epinstructor... Done!
Removing 0 users from epcoordinator... Done!
Removing 4 users from eponline... Done!
Removing 4 users from epcampus... Done!
Removing 6 users from epinstructor... Done!
Removing 6 users from epcoordinator... Done!
Removing 0 users from eponline... Done!
Removing 0 users from epcampus... Done!
Removing 0 users from epinstructor... Done!
Removing 1 users from epcoordinator... Done!
Removing 0 users from eponline... Done!
Removing 0 users from epcampus... Done!
Removing 0 users from epinstructor... Done!
Removing 0 users from epcoordinator... Done!
Removing 3 users from eponline... Done!
Removing 3 users from epcampus... Done!
Removing 4 users from epinstructor... Done!
Removing 4 users from epcoordinator... Done!
Removing 7 users from eponline... Done!
Removing 5 users from epcampus... Done!
Removing 13 users from epinstructor... Done!
Removing 10 users from epcoordinator... Done!
Removing 13 users from eponline... Done!
Removing 7 users from epcampus... Done!
Removing 2 users from epinstructor... Done!
Removing 5 users from epcoordinator... Done!
Removing 1 users from eponline... Done!
Removing 1 users from epcampus... Done!
Removing 1 users from epinstructor... Done!
Removing 2 users from epcoordinator... Done!
Removing 9 users from eponline... Done!
Removing 8 users from epcampus... Done!
Removing 8 users from epinstructor... Done!
Removing 11 users from epcoordinator... Done!
Removing 0 users from eponline... Done!
Removing 0 users from epcampus... Done!
Removing 0 users from epinstructor... Done!
Removing 0 users from epcoordinator... Done!
Removing 1 users from eponline... Done!
Removing 1 users from epcampus... Done!
Removing 2 users from epinstructor... Done!
Removing 2 users from epcoordinator... Done!
Removing 0 users from eponline... Done!
Removing 0 users from epcampus... Done!
Removing 0 users from epinstructor... Done!
Removing 0 users from epcoordinator... Done!
Removing 8 users from eponline... Done!
Removing 6 users from epcampus... Done!
Removing 10 users from epinstructor... Done!
Removing 10 users from epcoordinator... Done!
Removing 3 users from eponline... Done!
Removing 2 users from epcampus... Done!
Removing 3 users from epinstructor... Done!
Removing 2 users from epcoordinator... Done!
Removing 0 users from eponline... Done!
Removing 0 users from epcampus... Done!
Removing 7 users from epinstructor... Done!
Removing 5 users from epcoordinator... Done!
Removing 0 users from eponline... Done!
Removing 0 users from epcampus... Done!
Removing 2 users from epinstructor... Done!
Removing 2 users from epcoordinator... Done!
Removing 10 users from eponline... Done!
Removing 10 users from epcampus... Done!
Removing 6 users from epinstructor... Done!
Removing 6 users from epcoordinator... Done!
Removing 0 users from eponline... Done!
Removing 1 users from epcampus... Done!
Removing 13 users from epinstructor... Done!
Removing 3 users from epcoordinator... Done!
Removing 21 users from eponline... Done!
Removing 16 users from epcampus... Done!
Removing 82 users from epinstructor... Done!
Removing 6 users from epcoordinator... Done!
Removing 0 users from eponline... Done!
Removing 0 users from epcampus... Done!
Removing 0 users from epinstructor... Done!
Removing 0 users from epcoordinator... Done!
reedy@deploy1001:~$

Thank you. We could use the same system for Flow, if there's a way in Bash to foreachwiki NOT in dblist flow.dblist etc.