jenkins-bot has submitted this change and it was merged.
Change subject: Give a notice if the user isn't allowed to create the page
......................................................................
Give a notice if the user isn't allowed to create the page
Bug: 67550
Change-Id: I59bc9bf5efe0b2fe9261350276316bfab117e6cf
---
M ApiVisualEditor.php
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
Objections:
Krinkle: There's a problem with this change, please improve
diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 55dc7a0..8abcb09 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -371,6 +371,12 @@
}
}
+ if ( !$page->userCan( 'create' ) &&
!$page->exists() ) {
+ $notices[] = $this->msg(
+
'permissionserrorstext-withaction', 1, $this->msg( 'action-createpage' )
+ ) . "<br>" . $this->msg( 'nocreatetext'
)->parse();
+ }
+
// Show notice when editing user / user talk
page of a user that doesn't exist
// or who is blocked
// HACK of course this code is partly
duplicated from EditPage.php :(
--
To view, visit https://gerrit.wikimedia.org/r/144275
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I59bc9bf5efe0b2fe9261350276316bfab117e6cf
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits