phacility/phabricator · error · Exception

You can not close this revision because you are not the…

Error message

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.

What it means

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.

Solutions

  1. Have the revision author perform the close, since by default only the owner may close their revision
  2. Enable the config key differential.always-allow-close in Config to permit other users to close revisions
  3. 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
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php:83 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/75efae5cd17f8b56. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php:83

    if ($object->isClosed()) {
      throw new Exception(
        pht(
          'You can not close this revision because it has already been '.
          'closed. Only open revisions can be closed.'));
    }

    if (!$object->isAccepted()) {
      throw new Exception(
        pht(
          'You can not close this revision because it has not been accepted. '.
          'Revisions must be accepted before they can be closed.'));
    }

    $config_key = 'differential.always-allow-close';
    if (!PhabricatorEnv::getEnvConfig($config_key)) {
      if (!$this->isViewerRevisionAuthor($object, $viewer)) {
        throw new Exception(
          pht(
            '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.',
            $config_key));
      }
    }
  }

  public function getTitle() {
    $commit_phid = $this->getMetadataValue('commitPHID');
    if ($commit_phid) {
      $commit = id(new DiffusionCommitQuery())
        ->setViewer($this->getViewer())
        ->withPHIDs(array($commit_phid))
        ->needIdentities(true)
        ->executeOne();
    } else {

View on GitHub (pinned to 5720a38cfe)