mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-28 09:20:42 +00:00
Properly restrict SpecialMathStatus to those with purge
rights
Bug: T252362 Change-Id: I98eabfbeda2fbef3c317c7bb6aaddf5595788f5c
This commit is contained in:
parent
72bf6644eb
commit
17b2ce0d2d
|
@ -16,7 +16,7 @@ class SpecialMathStatus extends SpecialPage {
|
|||
private $logger;
|
||||
|
||||
public function __construct( $name = 'MathStatus' ) {
|
||||
parent::__construct( $name );
|
||||
parent::__construct( $name, 'purge' );
|
||||
|
||||
$this->logger = LoggerFactory::getInstance( 'Math' );
|
||||
}
|
||||
|
@ -29,11 +29,6 @@ class SpecialMathStatus extends SpecialPage {
|
|||
*/
|
||||
public function execute( $query ) {
|
||||
$this->setHeaders();
|
||||
if ( !( $this->getUser()->isAllowed( 'purge' ) ) ) {
|
||||
// The effect of loading this page is comparable to purge a page.
|
||||
// If desired a dedicated right e.g. "viewmathstatus" could be used instead.
|
||||
throw new PermissionsError( 'purge' );
|
||||
}
|
||||
|
||||
$out = $this->getOutput();
|
||||
$enabledMathModes = MathHooks::getMathNames();
|
||||
|
|
Loading…
Reference in a new issue