Page MenuHomePhabricator

Handle users with block/permission issues
Closed, ResolvedPublic

Assigned To
Authored By
eamedina
Aug 24 2022, 4:53 PM
Referenced Files
F41694479: 2024-01-09_14-43-47.png
Jan 16 2024, 10:37 PM
F41694477: 2024-01-09_14-43-12.png
Jan 16 2024, 10:37 PM
F41664156: image.png
Jan 10 2024, 8:43 PM
F41659665: T316131_Create.webm
Jan 9 2024, 1:08 AM
F41659664: T316131_Add.webm
Jan 9 2024, 1:08 AM
F41659663: T316131_Edit.webm
Jan 9 2024, 1:08 AM
F41659659: T316131_Partial_2.webm
Jan 9 2024, 1:08 AM
F41659657: T316131_Sitewide_2.webm
Jan 9 2024, 1:08 AM

Description

Some sort of user validation to treat users with block/permission issues as appropriate. Need to understand what is appropriate for such cases, what are the different types of issues. For example: if a user is blocked from editing an article, what type of create/edit permission should the user have for stories in the article? What about creating/editing in the Story namespace?

Originated from this feedback

Block/Unblock reference

Solution

Restricted.png (780×360 px, 271 KB)
  • Display a banner for users with a site-wide or page-specific block when they attempt to create a new Wikistory or edit an existing one.
  • Not displayed for users with partial blocks that are unrelated to the Wikistory they are working on.
  • Unlike other banners, can we keep this banner remains visible and does not fade away, providing a constant reminder of the restriction.
  • Banner message 'Your account is currently restricted from editing or creating a Wikistory.'

QA instructions

In order to test, you can first make sure you have an account with admin rights [1], and then use that admin account to block another testing account using http://localhost:8080/wiki/Special:Block. Only blocked users should see the error notice, I also tested with a partial block where only one article is restricted but others are allowed.

[1] https://www.mediawiki.org/wiki/Manual:FAQ#Initial_user_was_not_created_by_installer_or_it_is_not_an_administrator

QA Results - Beta

Event Timeline

SBisson edited projects, added Wikistories; removed Wikistories (R2).
eamedina triaged this task as Medium priority.
eamedina moved this task from Ready for Dev to Dev on the Inuka-Team (Kanban) board.

Change 980511 had a related patch set uploaded (by Eamedina; author: Eamedina):

[mediawiki/extensions/Wikistories@master] Show error Notice if user is blocked from current article

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

Change 980511 merged by jenkins-bot:

[mediawiki/extensions/Wikistories@master] Show error Notice if user is blocked from current article

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

@eamedina Sitewide and Partial block are working as designed when a username is blocked. Partial block only sees the banner for the article they are blocked with. They are also the only ones that will see the block error notice. When you block an IP address though, you do not get the error even though that's the IP address that should be blocked

Status: ❌ FAIL
Environment: Local: 1.42.0-alpha (7731c6e) 16:24, 8 January 2024
OS: macOS Sonoma 14.2
Browser: Chrome 120, Firefox 120, Safari 17.2, Edge 120
Skins. Minvera
Device: MBA M2
Emulated Device:: n/a
Test Links:
http://localhost:8080/wiki/Special:StoryBuilder/Story:Dog_Test?frameid=0#story
http://localhost:8080/wiki/Special:StoryBuilder/Story:Cat_Test?frameid=0#story

❌ AC1: https://phabricator.wikimedia.org/T316131

When IP Addressed is blocked - Blocked error does not appear

IP Address
2024-01-08_16-57-54.png (1×1 px, 203 KB)

When Username is blocked - Blocked error does appear

BlocksSitewide BlockPartial Block
Screenshot
2024-01-08_13-29-46.png (1×893 px, 143 KB)
2024-01-08_16-03-56.png (1×1 px, 199 KB)
Edit
New Wikistory

**Possible Issues**

Should there be a hard stop when a user is blocked besides letting you able to proceed? You can't save it but wasn't sure if it should even allow you to get further or not as seen in the .webm's below.

Edit

Add

Create

When IP Addressed is blocked - Blocked error does not appear

Interesting catch, I hadn't thought of this perspective. After debugging with George, we learned admins can specifically mark whether an IP block should include users who log in with that IP address, so admins can do this if they wish. Either way, anonymous users can't create/edit Wikistories (only view them), they have to log in to create/edit, so from the perspective of the Wikistories extension a username block is all that's needed.

image.png (668×2 px, 292 KB)

Should there be a hard stop when a user is blocked besides letting you able to proceed?

This is a good point that we previously discussed as a team while developing this feature, we landed on the idea of letting blocked users at least be able to explore Wikistories as much as possible, without being able to publish/save (so the current behavior you're seeing).

@eamedina Ok sounds good. Based on the above and what I got when checking "Apply block to logged-in users from the IP address", I will move this to design sign-off. Thanks for all your work!

Status: ✅ PASS
Environment: Local: 1.42.0-alpha (7731c6e) 16:24, 8 January 2024
OS: macOS Sonoma 14.2
Browser: Chrome 120, Firefox 120, Safari 17.2, Edge 120
Skins. Minvera
Device: MBA M2
Emulated Device:: n/a
Test Links:
http://localhost:8080/wiki/Special:StoryBuilder/Story:Dog_Test?frameid=0#story
http://localhost:8080/wiki/Special:StoryBuilder/Story:Cat_Test?frameid=0#story

❌ AC1: https://phabricator.wikimedia.org/T316131
When IP Addressed is blocked - Blocked error does not appear

✅ AC1: https://phabricator.wikimedia.org/T316131 - OK as talked about if you check off "Apply block to logged-in users from the IP address", a block error does appear.

2024-01-09_14-43-12.png (1×1 px, 244 KB)
2024-01-09_14-43-47.png (1×2 px, 1 MB)