41 private string $result;
53 $this->permissionManager = $permissionManager;
54 $this->title = $title;
60 if ( $this->permissionManager->isBlockedFrom( $this->user, $this->title ) ) {
61 $this->result = self::CONSTRAINT_FAILED;
62 return self::CONSTRAINT_FAILED;
65 $this->result = self::CONSTRAINT_PASSED;
66 return self::CONSTRAINT_PASSED;
72 if ( $this->result === self::CONSTRAINT_FAILED ) {
73 $statusValue->
setResult(
false, self::AS_BLOCKED_PAGE_FOR_USER );
if(!defined('MW_SETUP_CALLBACK'))
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.