PermissionManager doesn't exist in 1.33, so we cannot use it in 1.31
[lhc/web/wiklou.git] / includes / specials / SpecialRedirect.php
index 7eba0de..27176c4 100644 (file)
@@ -81,9 +81,7 @@ class SpecialRedirect extends FormSpecialPage {
                        // Message: redirect-not-exists
                        return Status::newFatal( $this->getMessagePrefix() . '-not-exists' );
                }
-               if ( $user->isHidden() && !MediaWikiServices::getInstance()->getPermissionManager()
-                       ->userHasRight( $this->getUser(), 'hideuser' )
-               ) {
+               if ( $user->isHidden() && !$this->getUser()->isAllowed( 'hideuser' ) ) {
                        throw new PermissionsError( null, [ 'badaccess-group0' ] );
                }
                $userpage = Title::makeTitle( NS_USER, $username );