Replace usages of deprecated User::isAllowed. Step 2.
[lhc/web/wiklou.git] / includes / specials / SpecialWhatLinksHere.php
index 2840086..5fe3605 100644 (file)
@@ -21,6 +21,7 @@
  * @todo Use some variant of Pager or something; the pagination here is lousy.
  */
 
+use MediaWiki\MediaWikiServices;
 use Wikimedia\Rdbms\IDatabase;
 
 /**
@@ -416,7 +417,9 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                // if the page is editable, add an edit link
                if (
                        // check user permissions
-                       $this->getUser()->isAllowed( 'edit' ) &&
+                       MediaWikiServices::getInstance()
+                               ->getPermissionManager()
+                               ->userHasRight( $this->getUser(), 'edit' ) &&
                        // check, if the content model is editable through action=edit
                        ContentHandler::getForTitle( $target )->supportsDirectEditing()
                ) {