Page MenuHomePhabricator

Enforce permission checks when deleting a Lexeme page
Closed, ResolvedPublic2 Story Points

Description

Acceptance criteria

  • A user without the right to delete pages can not delete a Lexeme

Scenarios

Scenario: No button on page

GIVEN I am logged in
AND I don't have rights to delete pages
WHEN I am on the Lexeme page
THEN there is no "Delete" button in the navigation menu

Scenario: Deep-link protected

GIVEN the lexeme page exists
AND I don't have rights to delete pages
WHEN I use action=delete of index.php to delete it
THEN I get the error message (TBC: intended behaviour the same as when trying to use the action to move an item page)

Scenario: API protected

GIVEN the lexeme page exists
AND I don't have rights to delete pages
WHEN I use API action=delete to delete it API module
THEN I get the error message (TBC: intended behaviour the same as when trying to use the API to move an item page)

Event Timeline

WMDE-leszek triaged this task as Normal priority.Mar 12 2018, 1:24 PM
WMDE-leszek created this task.
WMDE-leszek updated the task description. (Show Details)
WMDE-leszek updated the task description. (Show Details)Mar 12 2018, 3:55 PM
Pablo-WMDE updated the task description. (Show Details)Mar 12 2018, 4:15 PM
Pablo-WMDE updated the task description. (Show Details)Mar 12 2018, 4:28 PM
WMDE-leszek updated the task description. (Show Details)Mar 13 2018, 11:42 AM
WMDE-leszek set the point value for this task to 2.Mar 13 2018, 11:45 AM
Jakob_WMDE moved this task from To Do to Doing on the Wikidata-Turtles-18.03.28 board.

Change 424613 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/WikibaseLexeme@master] Test deleting a Lexeme requires adequate permissions.

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

Change 424613 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Test deleting a Lexeme requires adequate permissions.

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