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

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 subscribed.

Anybody available to look at this one?

Looks like "permissionserrors" might make the most sense

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

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