39 private $permissionManager;
60 $this->permissionManager = $permissionManager;
67 if ( $this->permissionManager->isBlockedFrom( $this->user, $this->title ) ) {
68 $this->result = self::CONSTRAINT_FAILED;
69 return self::CONSTRAINT_FAILED;
72 $this->result = self::CONSTRAINT_PASSED;
73 return self::CONSTRAINT_PASSED;
79 if ( $this->result === self::CONSTRAINT_FAILED ) {
80 $statusValue->
setResult(
false, self::AS_BLOCKED_PAGE_FOR_USER );
if(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.
Verify user permissions: Must not be blocked from the page.
getLegacyStatus()
Get the legacy status for failure (or success)
__construct(PermissionManager $permissionManager, LinkTarget $title, User $user)
Generic operation result class Has warning/error list, boolean status and arbitrary value.
setResult( $ok, $value=null)
Change operation result.
Interface for all constraints that can prevent edits.