X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2FMovePage.php;h=e6faacef47ab7840f9a1f45e838be5026e65f00f;hb=eb70451cec6409526c8feaedf55700f51e10ffe7;hp=a63eeaebda7f281f15130041685e8b2961eaf8e6;hpb=dcb26aa2dbf360fec1382a95161eaf0420bc60ad;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MovePage.php b/includes/MovePage.php index a63eeaebda..e6faacef47 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -141,8 +141,9 @@ class MovePage { } $tp = $this->newTitle->getTitleProtection(); - if ( $tp !== false && !$user->isAllowed( $tp['permission'] ) ) { - $status->fatal( 'cantmove-titleprotected' ); + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + if ( $tp !== false && !$permissionManager->userHasRight( $user, $tp['permission'] ) ) { + $status->fatal( 'cantmove-titleprotected' ); } Hooks::run( 'MovePageCheckPermissions', @@ -351,7 +352,8 @@ class MovePage { } // Check suppressredirect permission - if ( !$user->isAllowed( 'suppressredirect' ) ) { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + if ( !$permissionManager->userHasRight( $user, 'suppressredirect' ) ) { $createRedirect = true; }