Page MenuHomePhabricator

Allow a user to be blocked from creating pages only
Closed, ResolvedPublic3 Estimated Story PointsFeature

Description

Problem to solve

There are some problematic users who continually violate page creation policies & guidelines, but should otherwise be retained on the wiki as constructive contributors. For example a lot of brand new contributors immediately want to create new pages without a complete understanding of the notability guidelines. A sitewide block is not an appropriate way to handle these situations.

Proposed solution

It would be useful to be able to only block users from creating new pages.

What needs doing

Add the create action to the BlockActionInfo service.

Most of the acceptance criteria below will be handled by other tasks.

Acceptance criteria (for testing)

image.png (1×1 px, 266 KB)

  • On Special:Block, there is a checkbox for Creating pages (see T280719 for the final design)
  • When a block is saved with the 'Creating pages' checkbox selected, the target user should not be able to create new pages in any namespace via API, via any tool in any editor, or via any Special page.
  • When a block is saved with the 'Creating pages' checkbox selected, the log items should indicate page creation is part of the block - done in T279560
    • e.g. 23:20, 26 November 2018 AdminUsername (talk | contribs | block) blocked BadUser (talk | contribs) from editing Page(s) and creating pages with an expiration time of N (autoblock disabled) (unblock | change block)
    • e.g. 23:20, 26 November 2018 AdminUsername (talk | contribs | block) blocked BadUser (talk | contribs) from creating pages with an expiration time of N (autoblock disabled) (unblock | change block)
  • Special:BlockList should display that a user is blocked from creating pages as a bullet in the 'Block parameters' column - done in T279559
  • When the 'Creating page' checkbox is selected, the 'Uploading files' checkbox should become selected and disabled. (Uploading a file creates the file page.) Separated into T281487
Potential future enhancements:

These are out of scope for this ticket, but may need to be built later:

  • All wikis to configure if page creation blocks include pages within a Draft namespace
  • All wikis to configure if page creation blocks include sub-pages
  • All wikis to configure if page creation blocks include sub-pages of the user's userpage.
  • The 'Create' tab should not appear (sitewide blocked user still see the 'Create' tab.)
  • Clicking redlinks should not take the user to the edit mode (sitewide blocked users are still taken to edit mode)
  • Prevent users from creating pages by namespace (T275037).

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
TBolliger removed a project: Anti-Harassment.

Deprioritizing new feature development on Partial Blocks in 2019 by the WMF's Anti-Harassment team but leaving open on the Blocking Tools backlog. After we measure the effectiveness of page and namespace Partial Blocks we will reassess additional time investment.

Xaosflux changed the subtype of this task from "Task" to "Feature Request".Jan 14 2020, 7:38 PM
DannyS712 subscribed.

@Niharika any objections from Anti-Harassment / is this approved from a product point of view?

There should still be a way for a user blocked from creating pages to get from a redlink to search results for the redlinked title. Whether that is a link from a message saying something like "this page does not exist and you do not have permission to create it" or (maybe less preferably?) simply being taken to search results when clicking a red link or some other method I don't know.
The reason is that these search results can be good way to find the article one intended to link to when the error (e.g. misspelling) is not immediately obvious.

@Niharika any objections from Anti-Harassment / is this approved from a product point of view?

@DannyS712 I think this task needs a bit more thinking about the planned work. I will discuss this with the team and we will decide whether it is worth investing time on this. I will ask you to look into something else if you are looking for something interesting to do. :)

DannyS712 changed the task status from Open to Stalled.Apr 12 2020, 7:26 PM
DannyS712 triaged this task as Low priority.

@Niharika any objections from Anti-Harassment / is this approved from a product point of view?

@DannyS712 I think this task needs a bit more thinking about the planned work. I will discuss this with the team and we will decide whether it is worth investing time on this. I will ask you to look into something else if you are looking for something interesting to do. :)

I should have enough to keep myself occupied, but I'll stall this task until its approved, to ensure I don't accidentally start work on it that is eventually abandoned

Acceptance criteria

  • On Special:Block, under 'Actions to block' add a checkbox for Creating pages
    • The checkbox should be unchecked by default
    • The checkbox should be marked as disabled unless the 'Partial' radio button is selected

I am wondering if the checkbox for Creating pages should be indented to be under the Partial blocks header to make it clear it's a partial block option.

    • If a user toggles either the 'Editing' checkbox or the Sitewide/Partial radio buttons, the checkbox should save whatever state the user configured it as. The state can be discarded on submit if the block is non-editing or sitewide.
  • When a block is saved with the 'Creating pages' checkbox selected, the target user should not be able to create new pages in any namespace via API, via any tool in any editor, or via any Special page.
    • TBD: The 'Create' tab should not appear (sitewide blocked user still see the 'Create' tab.)

This makes sense.

  • TBD: Clicking redlinks should not take the user to the edit mode (sitewide blocked users are still taken to edit mode)

Clicking redlinks should take them to the search with a message saying This page does not exist and you do not have the permission to create it. See more information. -- with a link to the block that blocked them from creating pages.

  • When a Partial block is saved with the 'Creating pages' checkbox selected, the log items should indicate page creation is part of the block
  • Special:BlockList should display that a user is blocked from creating pages as a bullet in the 'Block parameters' column
  • TBD: When the 'Creating page' checkbox is selected, the 'Uploading files' checkbox should become selected and disabled. (Uploading a file creates the file page.)

This makes sense.

Perhaps page creation should be allowed as part of file uploading if T6995: Allow users to be blocked from uploading files only is also done?

  • Blocked from page creation and file uploading: cannot creating file pages
  • Blocked from page creation, not file uploading: can only create pages as part of file uploading

Avoiding cookie licking pending product approval

Possible sub-task - use case for when:

User is blocked from EDITING a page
THEN
page is DELETED
User may now create/edit the page. So perhaps make the "edit block" become an edit OR create block (and not be dependent on the page title existing?)

Niharika changed the task status from Stalled to Open.Apr 13 2021, 2:44 PM
Niharika raised the priority of this task from Low to Medium.
Niharika updated the task description. (Show Details)

@AGueyte I've updated the task description with a "What needs doing" section - it's actually a lot simpler than the Acceptance Criteria would suggest...

Change 683728 had a related patch set uploaded (by AGueyte; author: AGueyte):

[mediawiki/core@master] Block Creating page action

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

Change 683728 merged by jenkins-bot:

[mediawiki/core@master] Block Creating page action

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

dom_walden subscribed.

When a user is blocked from creating new pages:

  • They cannot create new pages via web or API (I tested several different namespaces and subpages)
    • This includes not being able to create their own User_talk page. I wonder if we should do the same thing for editing where they are allowed unless we explicitly say so.
  • They can edit already existing pages
  • They can move a page, even though I think technically this creates a new page (with the same name as the old page IIRC)
  • They cannot upload a new file
  • They can reupload an existing file
  • They cannot successfully import (although they do not see a block error message)

I did some brief regression testing, checking that sitewide blocks prevented any page creation I tried (apart from user's own user_talk page) and partial blocks prevent creating in namespaces user is blocked from.

Test environment: https://en.wikipedia.beta.wmflabs.org (forgot to record the version)

IN set Final Story Points to 3.
IN updated the task description. (Show Details)

Does this have to be enabled on a project-by-project basis? For example I see this exist at testwiki, but not test2wiki; and not at production projects like metawiki

It is currently only enabled on testwiki, cswiki, fawiki, and ptwiki. Full deployment is T280531.

@Xaosflux @JJMC89 we haven't heard any concerns from our pilot wikis and could consider a broader rollout if I can get community relations support to help with announcing these changes and making sure we spare some time to work on improvements needed, if any. Our team is focusing on IP Masking at the moment and I am not sure how quickly we will be able to do this. I will post any updates I have on the deployment task T280531.