64 if ( $this->newContentModel === $this->title->getContentModel() ) {
66 return self::CONSTRAINT_PASSED;
69 if ( !$this->performer->authorizeWrite(
'editcontentmodel', $this->title, $this->status ) ) {
70 return self::CONSTRAINT_FAILED;
75 $titleWithNewContentModel = clone $this->title;
76 $titleWithNewContentModel->setContentModel( $this->newContentModel );
78 !$this->performer->authorizeWrite(
'editcontentmodel', $titleWithNewContentModel, $this->status )
79 || !$this->performer->authorizeWrite(
'edit', $titleWithNewContentModel, $this->status )
81 return self::CONSTRAINT_FAILED;
84 return self::CONSTRAINT_PASSED;