Commit 7e21ce30 authored by Marijn van Wezel's avatar Marijn van Wezel
Browse files

Merge branch 'remove-redundant-security-checks' into 'master'

Remove redundant security check from special pages

Closes #1

See merge request extensions/wsspaces!3
parents 8dd29515 c651cdaa
Pipeline #2277 passed with stages
in 26 seconds
{
"name": "WSSpaces",
"version": "2.1.0",
"version": "2.2.0",
"namemsg": "wss-extensionname",
"url": "https://wikibase-solutions.com",
"type": "csp",
......
......@@ -56,13 +56,6 @@ class SpecialActiveSpaces extends SpecialPage {
return $this->msg( 'wss-active-spaces-header' )->plain();
}
/**
* @inheritDoc
*/
public function getLoginSecurityLevel() {
return 'ws-manage-namespaces';
}
/**
* The main method that gets invoked upon successfully loading the special page, after preExecuteChecks have
* been performed.
......
......@@ -48,13 +48,6 @@ class SpecialAddSpace extends SpecialPage {
return $this->msg( 'wss-add-space-header' )->plain();
}
/**
* @inheritDoc
*/
public function getLoginSecurityLevel() {
return 'ws-create-namespaces';
}
/**
* @inheritDoc
* @throws \MWException
......
......@@ -56,13 +56,6 @@ class SpecialArchivedSpaces extends SpecialPage {
return $this->msg( 'wss-archived-spaces-header' )->plain();
}
/**
* @inheritDoc
*/
public function getLoginSecurityLevel() {
return 'ws-manage-namespaces';
}
/**
* @inheritDoc
* @throws MWException
......
......@@ -15,16 +15,6 @@ abstract class SpecialPage extends \SpecialPage {
$this->setHeaders();
$this->checkPermissions();
$security_level = $this->getLoginSecurityLevel();
if ( $security_level ) {
$proceed = $this->checkLoginSecurityLevel( $security_level );
if ( !$proceed ) {
return;
}
}
if ( $this->preExecute() === false ) {
return;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment