Page MenuHomePhabricator

Once DisableAccount extension is removed: remove all users from the 'inactive' user group and remove it from fishbowl.dblist and private.dblist list of permissions
Open, LowestPublic

Description

Per title.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 20 2017, 6:47 PM

Okay so the disabled accounts gets handled by the script. The other ones can be handled via DB if we don't care about logs.

Reedy added a comment.Sep 20 2018, 8:02 PM

I don't think all these wikis had the extension enabled though?

reedy@mwmaint2001:~$ foreachwikiindblist private.dblist sql.php inactive.sql | grep count
advisorswiki:      [count(*)] => 0
arbcom_cswiki:      [count(*)] => 0
arbcom_dewiki:      [count(*)] => 38
arbcom_enwiki:      [count(*)] => 0
arbcom_fiwiki:      [count(*)] => 1
arbcom_nlwiki:      [count(*)] => 0
auditcomwiki:      [count(*)] => 0
boardgovcomwiki:      [count(*)] => 0
boardwiki:      [count(*)] => 20
chairwiki:      [count(*)] => 0
chapcomwiki:      [count(*)] => 22
checkuserwiki:      [count(*)] => 0
collabwiki:      [count(*)] => 72
ecwikimedia:      [count(*)] => 0
electcomwiki:      [count(*)] => 0
execwiki:      [count(*)] => 0
fdcwiki:      [count(*)] => 0
grantswiki:      [count(*)] => 0
id_internalwikimedia:      [count(*)] => 0
iegcomwiki:      [count(*)] => 0
ilwikimedia:      [count(*)] => 2
internalwiki:      [count(*)] => 15
legalteamwiki:      [count(*)] => 0
movementroleswiki:      [count(*)] => 0
noboard_chapterswikimedia:      [count(*)] => 9
officewiki:      [count(*)] => 75
ombudsmenwiki:      [count(*)] => 0
otrs_wikiwiki:      [count(*)] => 26
projectcomwiki:      [count(*)] => 0
searchcomwiki:      [count(*)] => 0
spcomwiki:      [count(*)] => 0
stewardwiki:      [count(*)] => 0
techconductwiki:      [count(*)] => 0
transitionteamwiki:      [count(*)] => 0
wg_enwiki:      [count(*)] => 0
wikimaniateamwiki:      [count(*)] => 0
zerowiki:      [count(*)] => 0
reedy@mwmaint2001:~$ cat inactive.sql 
select count(*) from user_groups where ug_group = 'inactive';
reedy@mwmaint2001:~$ foreachwikiindblist private.dblist sql.php inactive.sql | grep count | grep -v "=> 0"
arbcom_dewiki:      [count(*)] => 38
arbcom_fiwiki:      [count(*)] => 1
boardwiki:      [count(*)] => 20
chapcomwiki:      [count(*)] => 22
collabwiki:      [count(*)] => 72
ilwikimedia:      [count(*)] => 2
internalwiki:      [count(*)] => 15
noboard_chapterswikimedia:      [count(*)] => 9
officewiki:      [count(*)] => 75
otrs_wikiwiki:      [count(*)] => 26

Change 462592 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[operations/mediawiki-config@master] Drop the 'inactive' user rights grant, no longer around post-DisableAccount

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

Reedy added a comment.EditedSep 24 2018, 11:14 PM

Very naieve query to see if the user has a blocked row (not whether it's still active etc)

select count(*) from user_groups inner join user on (user_id = ug_user) where ug_group = 'inactive';
select count(*) from user_groups inner join user on (user_id = ug_user) LEFT JOIN ipblocks on (user_id = ipb_user) where ug_group = 'inactive' AND ipb_id IS NOT NULL;
reedy@mwmaint2001:~$ mwscript sql.php --wiki=arbcom_dewiki inactivecount.sql 
stdClass Object
(
    [count(*)] => 38
)

stdClass Object
(
    [count(*)] => 38
)

reedy@mwmaint2001:~$ mwscript sql.php --wiki=arbcom_fiwiki inactivecount.sql 
stdClass Object
(
    [count(*)] => 1
)

stdClass Object
(
    [count(*)] => 1
)

reedy@mwmaint2001:~$ mwscript sql.php --wiki=boardwiki inactivecount.sql 
stdClass Object
(
    [count(*)] => 20
)

stdClass Object
(
    [count(*)] => 17
)

reedy@mwmaint2001:~$ mwscript sql.php --wiki=chapcomwiki inactivecount.sql 
stdClass Object
(
    [count(*)] => 22
)

stdClass Object
(
    [count(*)] => 22
)

reedy@mwmaint2001:~$ mwscript sql.php --wiki=collabwiki inactivecount.sql 
stdClass Object
(
    [count(*)] => 72
)

stdClass Object
(
    [count(*)] => 63
)

reedy@mwmaint2001:~$ mwscript sql.php --wiki=ilwikimedia inactivecount.sql 
stdClass Object
(
    [count(*)] => 2
)

stdClass Object
(
    [count(*)] => 2
)

reedy@mwmaint2001:~$ mwscript sql.php --wiki=internalwiki inactivecount.sql 
stdClass Object
(
    [count(*)] => 15
)

stdClass Object
(
    [count(*)] => 4
)

reedy@mwmaint2001:~$ mwscript sql.php --wiki=noboard_chapterswikimedia inactivecount.sql 
stdClass Object
(
    [count(*)] => 9
)

stdClass Object
(
    [count(*)] => 0
)

reedy@mwmaint2001:~$ mwscript sql.php --wiki=officewiki inactivecount.sql 
stdClass Object
(
    [count(*)] => 75
)

stdClass Object
(
    [count(*)] => 75
)

reedy@mwmaint2001:~$ mwscript sql.php --wiki=otrs_wikiwiki inactivecount.sql 
stdClass Object
(
    [count(*)] => 26
)

stdClass Object
(
    [count(*)] => 26
)

Count same:
arbcom_dewiki
arbcom_fiwiki
chapcomwiki
ilwikimedia
officewiki
otrs_wikiwiki

Count different:
boardwiki
collabwiki
internalwiki
noboard_chapterswikimedia

Some more confusion...

reedy@mwmaint2001:~$ cat inactivenulled.sql 
select count(*) from user_groups inner join user on (user_id = ug_user) where ug_group = 'inactive' AND user_password = '' AND user_email = '';

reedy@mwmaint2001:~$ nano inactivenulled.sql ^C
reedy@mwmaint2001:~$ ^C
reedy@mwmaint2001:~$ mwscript sql.php --wiki=boardwiki inactivenulled.sql 
stdClass Object
(
    [count(*)] => 8
)

reedy@mwmaint2001:~$ mwscript sql.php --wiki=collabwiki inactivenulled.sql 
stdClass Object
(
    [count(*)] => 1
)

reedy@mwmaint2001:~$ mwscript sql.php --wiki=internalwiki inactivenulled.sql 
stdClass Object
(
    [count(*)] => 2
)

reedy@mwmaint2001:~$ mwscript sql.php --wiki=noboard_chapterswikimedia inactivenulled.sql 
stdClass Object
(
    [count(*)] => 0
)

Fishbowl too!

reedy@mwmaint2001:~$ foreachwikiindblist fishbowl.dblist sql.php inactive.sql | grep count | grep -v "=> 0"
donatewiki:      [count(*)] => 8
foundationwiki:      [count(*)] => 63
reedy@mwmaint2001:~$ mwscript sql.php --wiki=foundationwiki inactivecount.sql
stdClass Object
(
    [count(*)] => 63
)

stdClass Object
(
    [count(*)] => 62
)
Reedy renamed this task from Once DisableAccount extension is removed: remove all users from the 'inactive' user group and remove it from private.dblist list of permissions to Once DisableAccount extension is removed: remove all users from the 'inactive' user group and remove it from fishbowl.dblist and private.dblist list of permissions.Sep 24 2018, 11:25 PM

So James and I have talked about this on IRC, and it kinda seems like a mess...

Most of them seem to have all inactive users blocked. 5 have different numbers between the two

I've no idea if these wikis ever actually had the DisabledAccount extension enabled, or they've just used the inactive group because it's there for fishbowl and private wikis. But as they didn't have the extension enabled any time recently, the inactive group is a no-op...

So, we can just remove the inactive group from all users, and then remove it from config. Removing it will certainly make no difference, but the fact that there's a discrepancy between inactive and blocked users, it's confusing...

Reedy changed the task status from Open to Stalled.Sep 24 2018, 11:34 PM

Change 462592 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[operations/mediawiki-config@master] Drop the 'inactive' user rights grant, no longer around post-DisableAccount

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

Aklapper changed the task status from Stalled to Open.May 13 2020, 12:10 PM

Extension got removed hence this task seems to not be stalled anymore. (If it is stalled on something else, please specify.)