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

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

Extension is being removed and archived.

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