{"record":{"id":"45974af5df0c871e","repo":"phacility/phabricator","slug":"you-can-not-accept-this-commit-because-you-are-the","errorCode":null,"errorMessage":"You can not accept this commit because you are the commit author. You can only accept commits you did not author. You can change this behavior by adjusting the \"%s\" setting in Config.","messagePattern":"You can not accept this commit because you are the commit author\\. You can only accept commits you did not author\\. You can change this behavior by adjusting the \"(.+?)\" setting in Config\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"warning","filePath":"src/applications/diffusion/xaction/DiffusionCommitAcceptTransaction.php","lineNumber":43,"sourceCode":"  protected function getCommitActionOrder() {\n    return 500;\n  }\n\n  public function getActionName() {\n    return pht('Accepted');\n  }\n\n  public function applyExternalEffects($object, $value) {\n    $status = PhabricatorAuditRequestStatus::ACCEPTED;\n    $actor = $this->getActor();\n    $this->applyAuditorEffect($object, $actor, $value, $status);\n  }\n\n  protected function validateAction($object, PhabricatorUser $viewer) {\n    $config_key = 'audit.can-author-close-audit';\n    if (!PhabricatorEnv::getEnvConfig($config_key)) {\n      if ($this->isViewerCommitAuthor($object, $viewer)) {\n        throw new Exception(\n          pht(\n            'You can not accept this commit because you are the commit '.\n            'author. You can only accept commits you did not author. You can '.\n            'change this behavior by adjusting the \"%s\" setting in Config.',\n            $config_key));\n      }\n    }\n\n    if ($this->isViewerFullyAccepted($object, $viewer)) {\n      throw new Exception(\n        pht(\n          'You can not accept this commit because you have already '.\n          'accepted it.'));\n    }\n  }\n\n  public function getTitle() {\n    return pht(","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diffusion/xaction/DiffusionCommitAcceptTransaction.php#L25-L61","documentation":"DiffusionCommitAcceptTransaction::validateAction() blocks 'Accept Commit' when the actor authored the commit and the config 'audit.can-author-close-audit' is disabled (the default). Phabricator's audit model wants acceptance from someone other than the author; the message includes the config key so installs can relax the rule.","triggerScenarios":"The commit author clicks Accept on their own commit in the Diffusion audit UI, or automation applies an accept transaction using the authoring account.","commonSituations":"Solo developers wanting to close their own audits; bots that both author and audit with one identity; installs unaware the config toggle exists.","solutions":["Enable the toggle: ./bin/config set audit.can-author-close-audit true (or via the Config web UI), then retry","Have another auditor accept the commit instead","For bots, perform audits with a dedicated service account that never authors commits"],"exampleFix":"# before: author accept is rejected under the default policy\n$author_account->applyAccept($commit);  # Exception\n\n# after: allow authors to accept their own commits instance-wide\n$ ./bin/config set audit.can-author-close-audit true\n$author_account->applyAccept($commit);  # OK","handlingStrategy":"validation","validationCode":"$config_key = 'audit.can-author-close-audit';\n$blocked = !PhabricatorEnv::getEnvConfig($config_key)\n  && $this->isViewerCommitAuthor($object, $viewer);\nif ($blocked) {\n  // do not offer or apply the accept transaction\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Hide the Accept action for authors when the config is off","Run audits from a dedicated auditor account that never authors commits"],"tags":["phabricator","audit","diffusion","policy","self-review","config"],"backgroundTag":"self-review-forbidden","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}