Page MenuHomePhabricator

Add tests for not being able to edit Schemas
Closed, ResolvedPublic

Description

Editing schemas should not be possible if:

We need to check what MediaWiki does in this case, and then assert that we do the same. (For instance, the “edit” link changes to “view source”, right?)

Event Timeline

(For instance, the “edit” link changes to “view source”, right?)

Not in a default MediaWiki installation, apparently.

Change 486471 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseSchema@master] Add test for blocked users editing schemas

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

Lucas_Werkmeister_WMDE updated the task description. (Show Details)

I’m not sure how easy it will be to test the other things… for example, how do you switch the wiki to read-only mode (and back!) via a browser test?

Change 486471 merged by jenkins-bot:
[mediawiki/extensions/WikibaseSchema@master] Add test for blocked users editing schemas

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

Change 487030 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseSchema@master] Fix restriction for editing schemas

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

Change 487031 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseSchema@master] Add tests for editing schemas

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

hoo updated the task description. (Show Details)

Change 487030 merged by jenkins-bot:
[mediawiki/extensions/WikibaseSchema@master] Fix restriction for editing schemas

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

Change 487031 merged by jenkins-bot:
[mediawiki/extensions/WikibaseSchema@master] Add tests for editing schemas

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

I think we can skip the protected case, that’s really MediaWiki’s responsibility IMHO.

Moving to Verification – @Lydia_Pintscher, you should be able to test the first part using your account on the wikidata-shex wiki (block yourself and then check you can’t edit), and the second part in a private window (anonymous users can’t edit on that wiki). I think we can leave the read-only part without verification.

Michael subscribed.

Verified that tests are running and passing ✅