Page MenuHomePhabricator

Prohibit empty blocks
Open, LowPublic

Description

If an admin (or whomever holds block permissions) sets a partial block but includes no actions to block, the block should not be set.

Acceptance criteria

  • The 'Block' (or variant) button should be marked as disabled if a block is configured as non-editing but holds no non-editing actions (email, account creation, and in the future upload, page create, etc.)
  • The API should submit an appropriate error message if this type of block is set via API.

Event Timeline

Xaosflux created this task.Nov 3 2018, 2:00 PM
Platonides renamed this task from parital block "non-editing actions" does not prevent upload action to partial block "non-editing actions" does not prevent upload action.Nov 3 2018, 2:06 PM

I don't think it should report any block if no pages are selected. It should report an error instead. Magically making "blocking from no pages" mean that they can't do an undefined "something else" upload, move, use certain Special page...?) is a bad idea. If we want to disable upload, the revoked rights should be explicitly stated somwhere.

If the intent is to actually block 'non editing actions' - this isn't working; if this is only supposed to apply to pages and no pages are included the block should fail.

IKhitron removed a subscriber: IKhitron.Nov 3 2018, 2:59 PM

Also, if this SHOULD work - the UI appears to have no way to issue someone a general 'non editing actions' block while they are also blocked from editing at least one specific page.

I believe this should be resolved with T6995 correct @TBolliger?

dmaza added a subscriber: dmaza.Nov 5 2018, 2:50 PM

I believe this should be resolved with T6995 correct @TBolliger?

Yes, this is currently not an option when creating a non-editing block

@dmaza T6995 looks to be about ONLY upload blocks?

dbarratt added a comment.EditedNov 5 2018, 4:52 PM

The blocked user can still perform the non-editing action of upload

This is a feature, not a bug.

When T6995 is complete the admin will be able to specify if a user should or should not be blocked from uploading.

@TBolliger, correct me if I'm wrong. :)

@Xaosflux

Can you explain what this means?

The system reports the user is blocked from "from non-editing actions"

Where does it report that? What does it look like? Can you post a screenshot if possible?

Hi! There are a few things I want to comment on.

#1 — The concept of "non-editing actions"

We want to make it possible for admins to configure a block so the user can edit all pages but not perform certain actions, such as uploading files, creating new pages, or emailing other users. Currently the only pieces of this functionality that work are sending email and creating accounts (both of which are minimally used by logged-in users, but were 'free' because they were already part of Special:Block.)

Our team is working on bugfixes to page blocks and then adding in namespace blocks. We'll get to the upload and page creation blocks after that.

#2 — The UI of Special:Block

The final designs will better explain this. We released this first iteration of partial blocks to test wiki with an extremely minimal change to the UI. Our wireframes for the final design can be found here: M255 and we will take T202773 into a near-future sprint for development.

#3 — The log entry text of "non-editing actions"

The current phrasing of the log entry is proving to be confusing. We want to add the word specified to make it more clear: T208806


I'll leave this task open for a few days so we can discuss, but otherwise I think this can be closed as invalid.

@TBolliger fixing that log verbiage is OK, but there is a different problem that should be solved:

A partial block of specified non-editing actions should fail if no non-editing actions are provided.

@TBolliger fixing that log verbiage is OK, but there is a different problem that should be solved:
A partial block of specified non-editing actions should fail if no non-editing actions are provided.

You're 100% correct. I would say that the 'block' button should be inactive (therefore signaling incomplete input) and the API should send an appropriate error message.

TBolliger renamed this task from partial block "non-editing actions" does not prevent upload action to A partial block of specified non-editing actions should fail if no non-editing actions are provided..Nov 5 2018, 11:14 PM
TBolliger updated the task description. (Show Details)

You're 100% correct. I would say that the 'block' button should be inactive (therefore signaling incomplete input) and the API should send an appropriate error message.

I see. So this means that you haven't actually blocked the user from anything? i.e. you haven't blocked them from account creation or from sending email, etc.?

yes, if the admin (or whomever is setting the block) configures it so the block will have no effect (short of being logged) then it should be prevent from being submitted and saved as a block.

yes, if the admin (or whomever is setting the block) configures it so the block will have no effect (short of being logged) then it should be prevent from being submitted and saved as a block.

oh ok. I would describe that as being empty unless you have a better word for it. :)

TBolliger renamed this task from A partial block of specified non-editing actions should fail if no non-editing actions are provided. to Prohibit empty blocks.Nov 6 2018, 12:51 AM

The new title and description seem better now, ultimately that was the problem, and making "something" blocked be a required element (just like other required elements such as the blocked account) is the fix.

TBolliger triaged this task as Low priority.Nov 16 2018, 3:37 PM
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.