Page MenuHomePhabricator

User rights hook doesn't take into account cross-wiki or global user rights changes
Closed, ResolvedPublic

Description

When you change the rights of a user on a remote wiki, a notification will be sent to the user with the remote user's ID on the local wiki.


Version: master
Severity: blocker
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=51540
https://bugzilla.wikimedia.org/show_bug.cgi?id=51541

Details

Reference
bz51418

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:00 AM
bzimport added a project: Notifications.
bzimport set Reference to bz51418.
bzimport added a subscriber: Unknown Object (MLST).
Krenair created this task.Jul 16 2013, 1:38 AM

Blocks announced deployment to meta (as announced at https://meta.wikimedia.org/wiki/Meta:Babel#Notifications_coming_to_Meta ) because that should be the only place where such cross-wiki rights changes are done from on Wikimedia sites.

Hi Alex, thanks for pointing out this issue, which may block our proposed release of Echo on Meta.

Can you please clarify what you expect the problem to be with our current user rights notification for Echo? (1)

Are you suggesting that the wrong user might receive a notification that their user rights were changed? Or are you concerned about a different issue?

We have a deployment window today for a couple hours for releasing Notifications on Meta. Do people think we should hold off another week to discuss all this, or is this not a serious issue?

I have added a couple colleagues on this ticket, to get your opinion as well. From a product standpoint, we would prefer to roll out this long-awaited feature now, then make any necessary tweaks later.

But if there is a critical reason why we should not deploy today, please state it clearly now, and we can postpone the proposed deployment to later this month.

Thanks in advance for your recommendations!

(1) User rights notification spec:
http://www.mediawiki.org/wiki/Echo/Feature_requirements#User_rights

(In reply to comment #2)

Are you suggesting that the wrong user might receive a notification that
their user rights were changed?

Yes. Cross-wiki user rights changes happen on meta but they are targeted at a specific user ID. Unfortunately Echo doesn't check which wiki the ID is from and will send a notification to a local user with the same ID as the target user on the remote wiki. This is -very- unlikely to be the correct account.

We have a deployment window today for a couple hours for releasing
Notifications on Meta. Do people think we should hold off another week to
discuss all this, or is this not a serious issue?

The wrong user getting notified that they have had a rights change, so not a week but it probably shouldn't happen today unless it can be fixed before then. Notifications really should not go out to the wrong users, that's a big problem as far as I'm concerned.

I have added a couple colleagues on this ticket, to get your opinion as well.
From a product standpoint, we would prefer to roll out this long-awaited
feature now, then make any necessary tweaks later.

This is not really what I'd call a 'tweak'...

(In reply to comment #2)

Are you suggesting that the wrong user might receive a notification that
their user rights were changed?

Precisely.

Meta-Wiki allows [[m:stewards]] to change rights across Wikimedia wikis. As I read comment 0, if a steward changes the user rights of "Jimbo Wales@enwiki" (who has a user ID of 24 on the English Wikipedia), the Meta-Wiki user with the same numerical user ID (as it happens, "Phil Bordelon" has a user ID of 24 on Meta-Wiki) will be incorrectly notified of a user rights change.

If you take a look at [[m:Special:Log/rights]], it's pretty clear that this is a blocker to deployment. These interwiki rights changes happen very frequently.

I just want to say thank you very much to Alex for catching this prior to deployment. Nice work!

Hi Alex and MZ, thanks so much for your prompt response and thoughtful advice!

Based on your recommendations and our own review of this issue, we will postpone today's Meta deployment to a later date.

Our proposed solution for now would be to simply disable the 'user rights' notification on Meta, until we have more resources to support its unique cross-wiki requirements. To that end, we would add a 'local config file' that would allow any local wiki to disable any notification that is not appropriate for their project. In the case of Meta, we would disable 'user rights'.

Would that solution work for you in the near-term? When we get more resources, we could look into the more complex cross-wiki notification issues, but that could be a while.

And yes, thanks to Krenair for catching this in the nick of time. Much appreciated!

I love how there is no documentation of the cross-wiki rights setting feature anywhere, even on Special:UserRights.

Change 73990 had a related patch set uploaded by Alex Monk:
Don't trigger event when user rights change is cross-wiki

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

Thehelpfulonewiki wrote:

(In reply to comment #6)

I love how there is no documentation of the cross-wiki rights setting feature
anywhere, even on Special:UserRights.

It's only available for use by stewards, so only stewards need to see the documentation (Meta admins and crats still use Special:UserRights), it's the first item on their handbook, http://meta.wikimedia.org/wiki/Steward_handbook#User_groups_and_rights_adjustment.

(In reply to comment #6)

I love how there is no documentation of the cross-wiki rights setting feature
anywhere, even on Special:UserRights.

I love how developers do not know of this function.

(In reply to comment #9)

I love how developers do not know of this function.

Ryan was a little out of line in comment 6 (though I think he meant technical documentation, not user documentation), but this comment is really no better. MediaWiki and its related extensions are hundreds of thousands of lines of code. _Nobody_ (God excepted) knows the full codebase. :-)

Hi folks, what is your advice regarding the proposed user right notification on Meta?

Our original proposal is to disable it completely for now, so we can deploy in a timely manner, as stated above.

Another approach, recommended by Krenair on IRC, would be to only send notifications for local user right changes, but not for global changes.

The second option would at least cover some user right changes, but it also could create some inconsistency, which could be confusing to users.

Keep in mind that we have limited resources on this project and time is running out for us to deploy a practical solution before Wikimania and upcoming staff vacations in August.

Thoughts?

Thehelpfulonewiki wrote:

I'd say if you can give notifications for local rights changes on Meta then that would be good. Cross-wiki rights changes should give notifications on the wiki for which that person's user right was changed.

For example, if I was given a user right on the Spanish Wikivoyage by a steward on Meta, I would expect to receive that notification on the Spanish Wikivoyage, not Meta - I might not even know what Meta is.

Fabrice: just to clarify terms, stewards make 'local' rights changes on specific wikis through Meta's Special:UserRights page.

Then there's the separate matter of 'global' user rights changes when someone is added to a global group (such as you being in the global 'staff' user group) - what wiki would you use then to send the notification? The person's 'home' wiki as defined by SUL? Meta? Their most active wiki somehow?

Seems this is broken by global user rights changes as well. The user on the local wiki with the same ID as the target global user ID will get a notification.

bsitu wrote:

(In reply to comment #12)

For example, if I was given a user right on the Spanish Wikivoyage by a
steward
on Meta, I would expect to receive that notification on the Spanish
Wikivoyage,
not Meta - I might not even know what Meta is.

An Echo notification can only be fired within a local wiki. To be specific, an action in metawiki would not be able to trigger a notification in enwiki or other wikis. However, this is an ideal inter-wiki feature for Echo.

Change 73990 merged by jenkins-bot:
Don't trigger event when user rights change is cross-wiki or global

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