Page MenuHomePhabricator

Prompt user to log in to access Special:My* pages
Closed, ResolvedPublic

Description

Currently, when not logged-in, if you visit any of the Special:My* pages ( 'Mycontributions', 'MyLanguage', 'Mylog', 'Mypage', 'Mytalk', 'Myuploads') you will see contributions for your IP address.

For wikis with temporary accounts, showing the contributions for an IP address doesn't make sense anymore.

Proposed change: when temporary accounts are enabled, if the user is logged-out, we should require the user to login to access these pages.

Note that If the user is already logged-in with a temporary account, then the Special:My* pages will work just fine as is, without any changes needed.

Event Timeline

In addition we should also hide links to Special:MyContributions and Special:MyTalk in personal tools at the top of the page.

In addition we should also hide links to Special:MyContributions and Special:MyTalk in personal tools at the top of the page.

Good catch, thanks. If we remove those links, should add anything else in their place? cc @Niharika

image.png (362×594 px, 31 KB)

In addition we should also hide links to Special:MyContributions and Special:MyTalk in personal tools at the top of the page.

Good catch, thanks. If we remove those links, should add anything else in their place? cc @Niharika

image.png (362×594 px, 31 KB)

Let's skip adding there for now. I cannot think of anything that would be useful for temp accounts to have. They are getting access to notifications anyway which should point them to relevant places.

Amdrel changed the task status from Open to In Progress.Sep 13 2024, 4:44 PM

Change #1073294 had a related patch set uploaded (by Amdrel; author: Amdrel):

[mediawiki/core@master] Prompt user to log in to access Special:My* pages

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

I added a patch that adds redirects to all the listed pages except for 'Special:MyLanguage'. I don't think we should require a login for that special page redirect since my understanding is that it is used for links to translated pages to ensure that users get localized results for wikis that support that. I believe it defaults to the default wiki language for anonymous users. Let me know your thoughts.

Change #1073295 had a related patch set uploaded (by Amdrel; author: Amdrel):

[mediawiki/skins/Vector@master] Hide user links for anon users when temp accounts are enabled

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

I added a patch that adds redirects to all the listed pages except for 'Special:MyLanguage'. I don't think we should require a login for that special page redirect since my understanding is that it is used for links to translated pages to ensure that users get localized results for wikis that support that. I believe it defaults to the default wiki language for anonymous users. Let me know your thoughts.

That makes sense. Thanks for thinking this through.

Change #1073294 merged by jenkins-bot:

[mediawiki/core@master] Prompt user to log in to access Special:My* pages

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

Change #1074503 had a related patch set uploaded (by Amdrel; author: Amdrel):

[mediawiki/core@master] Hide user links for anon users when temp accounts are enabled

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

Change #1073295 abandoned by Amdrel:

[mediawiki/skins/Vector@master] Hide user links for anon users when temp accounts are enabled

Reason:

Supplanted by I4d883aea869c742b32bbbba46009ded9dddd0835

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

Change #1074503 merged by jenkins-bot:

[mediawiki/core@master] Hide user links for anon users when temp accounts are enabled

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

Djackson-ctr subscribed.

QA has been completed, and the new code change(s) are functioning as expected (when temporary accounts are enabled, if the user is logged-out and tries to access Special:My*pages, the user will be redirected to the login page, also user links will be hidden for anon users when temp accounts are enabled).