55 if ( $this->
new && !$this->performer->authorizeWrite(
'create', $this->target, $this->status ) ) {
56 return self::CONSTRAINT_FAILED;
59 if ( !$this->performer->authorizeWrite(
'edit', $this->target, $this->status ) ) {
60 return self::CONSTRAINT_FAILED;
63 return self::CONSTRAINT_PASSED;
69 if ( !$this->status->isGood() ) {
71 if ( $this->status->isBlocked() ) {
72 $statusValue->
setResult(
false, self::AS_BLOCKED_PAGE_FOR_USER );
73 } elseif ( $this->status->isRateLimitExceeded() ) {
74 $statusValue->setResult(
false, self::AS_RATE_LIMITED );
75 } elseif ( $this->status->getPermission() ===
'create' ) {
76 $statusValue->setResult(
false, self::AS_NO_CREATE_PERMISSION );
77 } elseif ( !$this->performer->isRegistered() ) {
78 $statusValue->setResult(
false, self::AS_READ_ONLY_PAGE_ANON );
80 $statusValue->setResult(
false, self::AS_READ_ONLY_PAGE_LOGGED );