Page MenuHomePhabricator

Update Inuka Team-owned Wikistories for IP Masking
Closed, ResolvedPublic

Description

IP Masking will affect lots of our products, features, tools, gadgets, etc. This task is for tracking work to update those that are owned by Inuka-Team, ahead of IP Masking being enabled on WMF sites.

See T326816: [Epic] Update features for temporary accounts, particularly What will be affected.

A preliminary investigation (T326759) has found that the following may be affected:

  • Wikistories

Wikistories is currently available as a beta feature. Therefore, the backend needs to be updated to check for named users instead of registered users. The frontend probably doesn't need to change.

Event Timeline

Hi @Tchanders, despite the anons being given a temp account, they are still fundamentally considered "unregistered", right?

The Wikistories extension uses isAnons/isLoggedIn functions (php and js) to show more features to logged in users. Can you confirm that those function will work as they do today and that temp accounts won't be in the user group?

That is not the case. Quoting from T326816 (please read for details):

"Temporary users are stored in the same way as regular users; they are recognised as temporary by checking their name
User::isAnon and mw.user.isAnon return false for a temporary account; a user's temporary status can be checked using User::isTemp"

Thanks @SCherukuwada for clarifying.

That's a pretty big change (as also illustrated by the enormous list of tasks). Has the alternative been considered (making isAnon true for temp users)? I'm wondering if anon users are better described by their unwillingness to sign up and login or the way their session is handled in the backend.

Is there a public discussion I can read through to better understand all the thinking that went into this?

Thanks

@SBisson It's difficult for me to give a direct answer to this, since the implementation of temporary accounts was done by folks other than AHT, so in that sense we are coming to it at the same stage as you are. But my vague understanding is that temporary accounts were implemented in a way that minimally disrupts the user account handling part of MediaWiki.

There is some discussion about technical approach on the task that introduced temporary accounts - T300263: [IP Masking] Create temporary account on first edit - as well as on the patches that introduced the changes (see https://gerrit.wikimedia.org/r/c/mediawiki/core/+/767617 and its related patches). It might be helpful to ask @tstarling directly about any questions that aren't covered there.

SBisson renamed this task from Update Inuka Team-owned products that may be affected by IP Masking to Update Inuka Team-owned Wikistories for IP Masking.Sep 12 2023, 3:55 PM
SBisson claimed this task.
SBisson triaged this task as Medium priority.
SBisson edited projects, added Inuka-Team (Kanban); removed Inuka-Team.
SBisson updated the task description. (Show Details)
SBisson moved this task from Backlog to Dev on the Inuka-Team (Kanban) board.

Change 956933 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/Wikistories@master] Handle temp users

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

Change 956933 merged by jenkins-bot:

[mediawiki/extensions/Wikistories@master] Handle temp users

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

Is this something I can test on betacluster? I do not have IP masking working locally, and do not know how to set discover mode to public on betacluster (though can change this locally). What is the best environment and way to test this with a temp account?

According to the notes on T326816: [Epic] Update features for temporary accounts, the feature is enabled on beta cluster dewiki. We could enable Wikistories there so they can be tested together.

It is also mentioned that you can set a config flag to test it locally. Keep in mind that you have to make an edit as anon for your temp account to be created and logged in.

there's also the patchdemo option but Wikistories doesn't work well there because it's setup and configuration are currently outdated.

This is functioning correctly. For temp users, the story does not display in beta discovery mode, but does with public discovery mode.

$wgWikistoriesDiscoveryMode = 'beta';$wgWikistoriesDiscoveryMode = 'public';
Screenshot 2023-11-07 at 3.29.53 PM.png (1×3 px, 711 KB)
Screenshot 2023-11-07 at 3.34.47 PM.png (1×3 px, 723 KB)

this functions the same as it does with logged out / unregistered users. They story does not display in beta discovery mode, but does display with public discovery mode.

$wgWikistoriesDiscoveryMode = 'beta'; $wgWikistoriesDiscoveryMode = 'public';
Screenshot 2023-11-07 at 3.43.51 PM.png (1×3 px, 696 KB)
Screenshot 2023-11-07 at 3.42.53 PM.png (1×3 px, 715 KB)

Moving to product sign off