Page MenuHomePhabricator

[Tracking] Enable user group expiry on Wikimedia wikis
Closed, ResolvedPublic

Description

Those with authority to change user groups will have the option of specifying a expiry time for those permissions. Users who can add a particular right, but not remove it, will be able to lengthen the duration of a user's existing group membership (for example, if they are reconfirmed by their community for another year), but not shorten it (because reducing expiry to e.g. 1 second is tantamount to removing the right). On the other hand, those who can remove a right but not add it will not gain any additional powers. The feature only applies to local groups; no changes are being made to global groups for the moment.

The primary audience for this change is Meta stewards, but other communities will be able to make use of it if they wish. The ability to grant user permissions is restricted to users with advanced rights, and these users are expected to follow policy, so if a community wishes to restrict local administrators/bureaucrats from granting temporary user rights, policy controls are an appropriate solution.

If you have bureaucrat or steward rights on the beta cluster, you can head over there to test the user rights expiry interface right now.

This will fulfil the #10 wish on the 2016 Community Wishlist Survey.

Related Objects

Event Timeline

We also need to think about T157015: Update extensions for expiring user groups. That list contains a few WMF-deployed extensions:

There's also T153817: Notify users when their user group membership is about to expire, or has expired. This is a nice-to-have sort of thing that I am definitely going to keep pushing for, but it doesn't seem like a critical ingredient to me, and it also poses some significant implementation challenges.

kaldari renamed this task from Enable user group expiry on Wikimedia wikis to [Tracking] Enable user group expiry on Wikimedia wikis.Mar 8 2017, 1:23 AM

As far as I can see everything in the comment of @TTO above is either "resolved" or "not a high priority"/"probably not deployment blockers"/"nice-to-have". So could we have an update on what is actually blocking this by now?

I would ideally like to get the DisableAccount and FlaggedRevs patches merged, but if that can't happen soon I will try and get the deployment process underway.

@Anomie, do you think you'd have time to review https://gerrit.wikimedia.org/r/341947 and https://gerrit.wikimedia.org/r/341951 in the near future?

TTO added a subscriber: gerritbot.

Seems that @gerritbot was caught dozing. Config patch uploaded at https://gerrit.wikimedia.org/r/347545, although -1'd for now.

All blockers have been dealt with, so let's do this. I've scheduled this for a SWAT deployment on 24 April.

Sample user notice for Tech News: "Administrators, bureaucrats and stewards will be able to set an expiry date for user groups, similar to the way blocks and page protections can be set to expire. New options will be shown at [[Special:UserRights]] to optionally allow an expiry date to be selected. See [[mw:Help:User rights and groups#Assigning and revoking user groups]] for more information."

Change 347545 merged by jenkins-bot:
[operations/mediawiki-config@master] Enable user group expiry in production

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

Mentioned in SAL (#wikimedia-operations) [2017-04-24T13:26:34Z] <hashar@naos> Synchronized wmf-config/InitialiseSettings.php: Enable user group expiry in production - T159416 (duration: 00m 49s)

The ug_expiry database field was not deployed on labswiki ( T160686 ). But that got hot fixed by the DBA.

Mentioned in SAL (#wikimedia-operations) [2017-04-24T13:47:13Z] <marostegui> Deploy unscheduled alter table on silver (labswiki.user_groups) - T159416

This is now enabled on WMF wikis (although we briefly brought wikitech down - thanks Manuel for saving the day with a quick ALTER TABLE!).

Unfortunately, the fix to T159301: User group membership notification about changed expiration date should be more specific is currently not deployed on WMF wikis. This is obviously not the ideal way to do things, but I wouldn't have been available for another SWAT for possibly months (they are at really bad times of day/week for me) and I felt it would be unfair to keep everyone waiting that long. So for the next few days, users receive the wrong Echo notification in the case that the expiry date of their already-assigned user group is changed.

As a workaround for the above issue until wmf.21 goes out later in the week (it will be on all wikis by Thursday 2200 UTC assuming nothing blows up in the process), stewards/bureaucrats should post a talk page message to the user if you need to alter expiry dates of user groups. Otherwise users will see only the confusing Echo message. After wmf.21 goes out, a more sensible/relevant Echo message will be used to notify users of a change to the expiry of their user rights.