- 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' );