{"record":{"id":"75efae5cd17f8b56","repo":"phacility/phabricator","slug":"you-can-not-close-this-revision-because-you-are-no","errorCode":null,"errorMessage":"You can not close this revision because you are not the author. You can only close revisions you own. You can change this behavior by adjusting the \"%s\" setting in Config.","messagePattern":"You can not close this revision because you are not the author\\. You can only close revisions you own\\. You can change this behavior by adjusting the \"(.+?)\" setting in Config\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php","lineNumber":83,"sourceCode":"\n    if ($object->isClosed()) {\n      throw new Exception(\n        pht(\n          'You can not close this revision because it has already been '.\n          'closed. Only open revisions can be closed.'));\n    }\n\n    if (!$object->isAccepted()) {\n      throw new Exception(\n        pht(\n          'You can not close this revision because it has not been accepted. '.\n          'Revisions must be accepted before they can be closed.'));\n    }\n\n    $config_key = 'differential.always-allow-close';\n    if (!PhabricatorEnv::getEnvConfig($config_key)) {\n      if (!$this->isViewerRevisionAuthor($object, $viewer)) {\n        throw new Exception(\n          pht(\n            'You can not close this revision because you are not the '.\n            'author. You can only close revisions you own. You can change '.\n            'this behavior by adjusting the \"%s\" setting in Config.',\n            $config_key));\n      }\n    }\n  }\n\n  public function getTitle() {\n    $commit_phid = $this->getMetadataValue('commitPHID');\n    if ($commit_phid) {\n      $commit = id(new DiffusionCommitQuery())\n        ->setViewer($this->getViewer())\n        ->withPHIDs(array($commit_phid))\n        ->needIdentities(true)\n        ->executeOne();\n    } else {","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php#L65-L101","documentation":"Error \"You can not close this revision because you are not the author. You can only close revisions you own. You can change this behavior by adjusting the \"%s\" setting in Config.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Have the revision author perform the close, since by default only the owner may close their revision","Enable the config key differential.always-allow-close in Config to permit other users to close revisions","Confirm you are logged in as the intended user and that the revision was not authored on your behalf by a bot, making you not the owner"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}