Page MenuHomePhabricator

Partially blocked users should be allowed to use Special:UploadWizard
Closed, ResolvedPublic

Description

As a follow-up to T209097: FormSpecialPage::checkExecutePermissions should only block a FormSpecialPage if the user is sitewide blocked

SpecialUploadWizard::isUserUploadAllowed needs to be modified to allow Partially Blocked users from accessing https://test.wikipedia.org/wiki/Special:UploadWizard


Acceptance criteria

  • Partially blocked users can access and use Special:UploadWizard if they are partially blocked

Event Timeline

Restricted Application added subscribers: MGChecker, Aklapper. · View Herald TranscriptFeb 27 2019, 4:30 PM

Change 494934 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/UploadWizard@master] Allow partially blocked users to access Special:UploadWizard

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

dbarratt assigned this task to Tchanders.Mar 7 2019, 7:27 PM
dbarratt moved this task from Ready to In progress on the Anti-Harassment (He — ה) board.

Change 494934 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Allow partially blocked users to access Special:UploadWizard

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

dom_walden added a subscriber: dom_walden.EditedMar 20 2019, 6:12 PM

@Tchanders It appears to block partially blocked users at the stage just after they have selected the image (on beta commons).

Block config:

Change 497937 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/core@master] Check whether a user is blocked from upload in ApiUpload

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

Thanks for pointing that out @dom_walden - it needed an additional patch in core.

Change 497937 merged by jenkins-bot:
[mediawiki/core@master] Check whether a user is blocked from upload in ApiUpload

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

Tested various functions offered by UploadWizard with different block configs.

Block shows the type of block (username, IP, IP range) and if it blocks a relevant namespace or page or if it is irrelevant to the action performed.

BlockUser rightsActionOutcome
Sitewide userUpload newBlocked
Partial user (irrelevant)Upload newSuccess
Partial IP (File ns)Upload newBlocked
Partial IP (irrel.)Upload newSuccess
Partial IP range (File ns)ipblock-exemptUpload newSuccess
Partial IP range (irrel.)ipblock-exemptUpload newSuccess
Partial IP range (irrel.)Upload flickrSuccess
Partial IP range (File ns)Upload flickrBlocked
Partial user (irrel.)Upload flickr (mobile)Success
Partial user (File ns)Upload flickr (mobile)Blocked
Partial user (Campaign ns)Upload Wizard campaign editorEdit campaignBlocked
Partial user (Campaign ns)Upload to campaignSuccess
Partial IP range (irrel.)Upload Wizard campaign editorEdit campaignSuccess
Partial IP (irrel.)Cross-wiki uploadSuccess
Partial IP (File ns)Cross-wiki uploadBlocked

I used the visual editor in beta wikipedia to "cross-wiki" upload files to commons. The block on commons was applied appropriately. Any blocks on beta wikipedia appeared to have no affect.

Moving an image

Not strictly related to this change, but improving coverage by looking at file moving.

Block**User rights*ActionOutcome
Partial user (irrel.)file moverMoveFile is moved
Partial user (Specific page)file moverMoveBlocked
Partial IP (File ns)file moverMoveBlocked
Partial IP range (File ns)ipblock-exempt,file moverMoveFile is moved
Partial IP range (irrel.)ipblock-exempt,file moverMoveFile is moved
Partial IP (irrel.)Move requestFile is moved
Partial IP (irrel.)file moverAccepting move requestFile is moved
Partial user (File ns)file moverDecline move requestBlocked
Partial user (irrel.)file moverDecline move requestFile is moved

Not tested

I could see no way to test the mass-upload user right. Turning it on and off for a user appeared to have no effect. In both cases I was able to upload more than one file at a time with Special:UploadWizard. This makes me think there is something I am missing, but I could find no documentation on this.

Environment

https://commons.wikimedia.beta.wmflabs.org
MediaWiki 1.33.0-alpha (3f54ff5) 08:37, 26 March 2019
Upload Wizard 1.5.0 (dba7f28) 07:45, 26 March 2019

https://en.wikipedia.beta.wmflabs.org
MediaWiki 1.33.0-alpha (3f54ff5) 08:37, 26 March 2019

Niharika closed this task as Resolved.Apr 8 2019, 8:54 PM