mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-27 04:06:51 +00:00
Merge "Give a notice if the user isn't allowed to create the page"
This commit is contained in:
commit
f220453495
|
@ -371,6 +371,12 @@ class ApiVisualEditor extends ApiBase {
|
|||
}
|
||||
}
|
||||
|
||||
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 :(
|
||||
|
|
Loading…
Reference in a new issue