For the 2FA enforcement project, we'd like to be able to automatically remove 2FA-less users from groups that require 2FA. In order not to reveal the user's activity, it'll be done using a maintenance script that runs periodically and checks whether users meet conditions for their groups.
For Wikimedia use case, removals of checkuser and suppressor should be also logged on Meta-Wiki, so that stewards can easily see for whom further off-boarding is needed.
Acceptance criteria
- The script ignores groups absent from $wgRestrictedGroups.
- For restricted groups, the script only processes ones that are configured to allow autodemotion.
- Every group removal is logged on the wiki's 'rights' log
- For select groups, the log entry is relayed to central wiki's 'rights' log as well.