48 $this->performer = $performer;
53 if ( !$this->performer->isAllowed(
'edit' ) ) {
54 $this->result = self::CONSTRAINT_FAILED;
55 return self::CONSTRAINT_FAILED;
58 $this->result = self::CONSTRAINT_PASSED;
59 return self::CONSTRAINT_PASSED;
65 if ( $this->result === self::CONSTRAINT_FAILED ) {
66 if ( !$this->performer->getUser()->isRegistered() ) {
67 $statusValue->
setResult(
false, self::AS_READ_ONLY_PAGE_ANON );
69 $statusValue->fatal(
'readonlytext' );
70 $statusValue->value = self::AS_READ_ONLY_PAGE_LOGGED;
if(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.
Verify user permissions: Must have edit rights.
__construct(Authority $performer)
getLegacyStatus()
Get the legacy status for failure (or success)
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.