jenkins-bot has submitted this change and it was merged.
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, 3 insertions(+), 1 deletion(-)
Approvals:
Wctaiwan: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/SpecialCreateMassMessageList.php
b/includes/SpecialCreateMassMessageList.php
index 60386e8..520fe2e 100644
--- a/includes/SpecialCreateMassMessageList.php
+++ b/includes/SpecialCreateMassMessageList.php
@@ -52,7 +52,9 @@
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: merged
Gerrit-Change-Id: Ifc72bd46a0ecf82cf85caedccae0b3c402479e03
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Wctaiwan <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits