59 if ( $this->newContentModel === $this->title->getContentModel() ) {
61 $this->result = self::CONSTRAINT_PASSED;
62 return self::CONSTRAINT_PASSED;
65 if ( !$this->performer->isAllowed(
'editcontentmodel' ) ) {
66 $this->result = self::CONSTRAINT_FAILED;
67 return self::CONSTRAINT_FAILED;
71 $titleWithNewContentModel = clone $this->title;
72 $titleWithNewContentModel->setContentModel( $this->newContentModel );
74 $canEditModel = $this->performer->authorizeWrite(
76 $titleWithNewContentModel
81 || !$this->performer->authorizeWrite(
'edit', $titleWithNewContentModel )
83 $this->result = self::CONSTRAINT_FAILED;
84 return self::CONSTRAINT_FAILED;
87 $this->result = self::CONSTRAINT_PASSED;
88 return self::CONSTRAINT_PASSED;