Page MenuHomePhabricator

MediawikiEditEntity::checkEditPermissions fatals with unknown message 'no-permission'
Closed, ResolvedPublic

Description

MediawikiEditEntity::checkEditPermissions performs some permission checks (EntityPermissionChecker::getPermissionStatusForEntity) and sets the Status instance to ->fatal(), with 'no-permission' as argument.
The expected argument is a MessageSpecifier or i18n message key, but 'no-permission' does not seem to exact as an error message.

Maybe 'badaccess' or 'permissionserrors' are better message keys to use & pass to ->fatal()?
Or 'no-permission' needs to be created as a message.

Expected behaviour:
When the user making an edit does not have sufficient permissions, the i18n message used to indicate the error is permissionserrors (already existing message)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 15 2019, 10:52 AM
Ramsey-WMF moved this task from Untriaged to Tracking on the Multimedia board.
Ramsey-WMF moved this task from To Do to Monitoring on the Structured Data Engineering board.
Ramsey-WMF added a subscriber: Ramsey-WMF.

Anybody available to look at this one?

Restricted Application added a project: Multimedia. · View Herald TranscriptAug 10 2019, 11:54 PM

Looks like "permissionserrors" might make the most sense

Addshore triaged this task as Medium priority.Feb 6 2020, 9:58 AM
Addshore moved this task from Backlog to On WMDE on the Wikibase-SDC-Shared board.
WMDE-leszek updated the task description. (Show Details)Feb 18 2020, 1:07 PM
WMDE-leszek updated the task description. (Show Details)Feb 18 2020, 1:10 PM

Change 572903 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/Wikibase@master] Do not fatal with 'no-permission' message

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

Change 572915 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/WikibaseLexeme@master] Skip tests in ApiUserBlockedTest temporary

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

Change 572917 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/WikibaseLexeme@master] Fix changes for error response

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

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptFeb 18 2020, 4:55 PM

Change 572915 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Skip tests in ApiUserBlockedTest temporary

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

Change 572903 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Do not fatal with 'no-permission' message

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

Change 572917 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Fix changes for error response

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

Restricted Application added a project: Structured-Data-Backlog. · View Herald TranscriptMar 16 2020, 3:37 PM