mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
Actually block blocked users in the Parsoid API
Change-Id: I29b938bb5c1ea00886cb2b0ab04121e4d4cd1890
This commit is contained in:
parent
d245ac030e
commit
e16346385d
|
@ -28,7 +28,9 @@ class ApiVisualEditor extends ApiBase {
|
|||
} else {
|
||||
$result = array( 'result' => 'success', 'parsed' => '' );
|
||||
}
|
||||
} elseif ( $params['paction'] === 'save' ) {
|
||||
} elseif ( $params['paction'] === 'save' && $wgUser->isBlocked() ) {
|
||||
$result = array( 'result' => 'error' );
|
||||
} elseif ( $params['paction'] === 'save' /* means user is not blocked */ ) {
|
||||
// API Posts HTML to Parsoid Service, receives Wikitext,
|
||||
// API Saves Wikitext to page.
|
||||
$wikitext = Http::post( $parsoid . $page->getPrefixedDBkey(),
|
||||
|
|
Loading…
Reference in a new issue