01tonythomas has uploaded a new change for review.
https://gerrit.wikimedia.org/r/185628
Change subject: Special:CreateMassMessageList should check for
"editcontentmodel" permission
......................................................................
Special:CreateMassMessageList should check for "editcontentmodel" permission
This would help display a nicer error message rather than the API
error
Bug: T76654
Change-Id: Ifc72bd46a0ecf82cf85caedccae0b3c402479e03
---
M includes/SpecialCreateMassMessageList.php
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage
refs/changes/28/185628/1
diff --git a/includes/SpecialCreateMassMessageList.php
b/includes/SpecialCreateMassMessageList.php
index 60386e8..726b8bf 100644
--- a/includes/SpecialCreateMassMessageList.php
+++ b/includes/SpecialCreateMassMessageList.php
@@ -52,7 +52,8 @@
return Status::newFatal(
'massmessage-create-invalidtitle' );
} elseif ( $title->exists() ) {
return Status::newFatal( 'massmessage-create-exists' );
- } elseif ( !$title->userCan( 'edit' ) || !$title->userCan(
'create' ) ) {
+ } elseif ( !$title->userCan( 'edit' ) || !$title->userCan(
'create' ) ||
+ !$title->userCan( 'editcontentmodel' ) ) {
return Status::newFatal(
'massmessage-create-nopermission' );
}
--
To view, visit https://gerrit.wikimedia.org/r/185628
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc72bd46a0ecf82cf85caedccae0b3c402479e03
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits