Page MenuHomePhabricator

Partially blocked users cannot tag revisions on unrelated pages, nor add, deactive or delete tags
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

If a user is partially blocked from the page "Foo" they cannot add a tag to a revision on the page "Bar".

They are also prevented from doing any actions on Special:Tags.

In both cases they are shown a message saying they are blocked.

I am assuming that we only want to prevent a user from tagging revisions on pages and/or namespaces they are explicitly blocked from and that partially blocked admins should still be able to create/edit/delete tags. Of course, you can decide what you think is appropriate.

For more technical information see, for example, T209004.

From reading the code I believe the same is true of the API for this component, but I have not tested it.

Steps to reproduce problem

On a wiki which has partial blocks enabled (e.g. https://en.wikipedia.beta.wmflabs.org or http://test.wikipedia.org/)

  1. As an admin, go to Special:Block
  2. Partially block $user from page $pageA (screenshot below) (make sure $user has changetags rights)
  3. As $user, go to page $pageB, view history and attempt to tag a revision

Expected behavior: Behaves as if the user were not blocked, i.e. they can add a tag (assuming this is what we want)
Observed behavior: User cannot add a tag, is told they are blocked.

Similarly, as a partially blocked admin (or someone with managechangetags rights), go to Special:Tags and attempt to create a new tag.

Screenshot

Details

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 19 2019, 10:15 AM
dom_walden updated the task description. (Show Details)Apr 19 2019, 10:16 AM
dom_walden updated the task description. (Show Details)
dom_walden updated the task description. (Show Details)Apr 19 2019, 12:44 PM
dom_walden updated the task description. (Show Details)

Change 517104 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/core@master] Don't block partially blocked users from tagging revisions

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

Change 524390 had a related patch set uploaded (by Dbarratt; owner: Dbarratt):
[mediawiki/core@master] Allow partially blocked users to tag unrelated revisions

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

WDoranWMF triaged this task as Normal priority.Jul 23 2019, 3:53 PM

Change 524390 merged by jenkins-bot:
[mediawiki/core@master] Allow partially blocked users to tag unrelated revisions

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

dom_walden added a subscriber: Niharika.

Special:EditTags (or the action=editchangetags from the revision history page)

  • Can add tags to revisions of pages unless blocked from that page or its namespace
  • If sitewide blocked, cannot tag a revision unless it is of user's own User_talk (and user is not blocked from latter)

Special:Tags
I can create, activate, deactivate and delete tags while partially blocked, but not sidewide.

API (action=tag)
Via the API, I can add a tag to a revision or recent change unless I am blocked from the page or namespace (or sitewide).

For tagging of logs, I can tag them if I am partially blocked, not sitewide.

The only exception is, if I am sitewide blocked but not blocked from my own User_talk, I cannot tag a revision of my own User_talk. It shows me a block notice as soon as it sees I am sitewide blocked.

API actions which allow you to specify which tags to apply to the revision behave the same way. These include editing, moving, rollback, delete.

For example, if you use the API to edit your own User_talk and specify tags for the edit, you will not be allowed if you are sitewide blocked, even if you are not blocked from your own User_talk.

You would have to repeat the action without the tags.

From reading the previous code, I think this is how it behaved before (in fact, it would prevent you doing the action even if you were partially blocked).

Raising this for the benefit of @Niharika. It is some interesting historical behaviour we have inherited.

Environment

https://en.wikipedia.beta.wmflabs.org/wiki MediaWiki 1.34.0-alpha (70e2881) 16:11, 11 September 2019

Most of the time I was testing with a user who had a composite block (both username and IP).

dbarratt closed this task as Resolved.Sep 12 2019, 12:04 AM