$params = $this->extractRequestParams();
$user = $this->getUser();
- if ( $user->isBlocked() ) {
+ $block = $user->getBlock();
+ if ( $block && $block->isSitewide() ) {
$this->dieBlocked( $user->getBlock() );
}
$this->mUnsuppress = $request->getVal( 'wpUnsuppress' ) && $user->isAllowed( 'suppressrevision' );
$this->mToken = $request->getVal( 'token' );
- if ( $this->isAllowed( 'undelete' ) && !$user->isBlocked() ) {
+ $block = $user->getBlock();
+ if ( $this->isAllowed( 'undelete' ) && !( $block && $block->isSitewide() ) ) {
$this->mAllowed = true; // user can restore
$this->mCanView = true; // user can view content
} elseif ( $this->isAllowed( 'deletedtext' ) ) {