Page MenuHomePhabricator

emptyUserGroup.php: Add options to log rights removal to Special:Log/rights
Closed, DuplicatePublic

Description

emptyUserGroup.php is a MediaWiki maintenance script used to remove all users from a given user group; specially if there are lots of members. Currently the usage of this script leaves no on-wiki traces, which might cause some transparency problems in some cases.

I propose that an option be added to the script so the user rights changes performed by this script be logged on the wiki's Special:Log/rights log. I guess we'll also need to attribute which on-wiki user made the change or attribute it to the generic 'Maintenance script' pseudoaccount. An option should be added for this as well.

If logging to the wiki, we should maybe make the script activity hidden from RecentChanges to avoid flooding the wikis.

Event Timeline

DannyS712 triaged this task as Medium priority.

Can just flag it as a bot to hide it by default

From what I have seen, most maintenance scripts interact directly with the database. This does not appear to be the case for emptyUserGroup. Additionally, from what I can tell the entries are not added to the former groups table. Should that be done as well?

DannyS712 removed a project: User-DannyS712.
Dreamy_Jazz subscribed.

Thanks for merging this. We did solve this in T394914, but I didn't see that the task already existed for this.

Additionally, from what I can tell the entries are not added to the former groups table. Should that be done as well?

I see that since your comment this has been addressed, because the script calls UserGroupManager::removeUserFromGroup which does this insertion.