phacility/phabricator · warning · Exception
You can not accept this commit because you are the commit au
Error message
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.
What it means
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.
Source
Thrown at src/applications/diffusion/xaction/DiffusionCommitAcceptTransaction.php:43
protected function getCommitActionOrder() {
return 500;
}
public function getActionName() {
return pht('Accepted');
}
public function applyExternalEffects($object, $value) {
$status = PhabricatorAuditRequestStatus::ACCEPTED;
$actor = $this->getActor();
$this->applyAuditorEffect($object, $actor, $value, $status);
}
protected function validateAction($object, PhabricatorUser $viewer) {
$config_key = 'audit.can-author-close-audit';
if (!PhabricatorEnv::getEnvConfig($config_key)) {
if ($this->isViewerCommitAuthor($object, $viewer)) {
throw new Exception(
pht(
'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.',
$config_key));
}
}
if ($this->isViewerFullyAccepted($object, $viewer)) {
throw new Exception(
pht(
'You can not accept this commit because you have already '.
'accepted it.'));
}
}
public function getTitle() {
return pht(View on GitHub (pinned to 5720a38cfe)
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
Example fix
# before: author accept is rejected under the default policy $author_account->applyAccept($commit); # Exception # after: allow authors to accept their own commits instance-wide $ ./bin/config set audit.can-author-close-audit true $author_account->applyAccept($commit); # OK
Defensive patterns
Strategy: validation
Validate before calling
$config_key = 'audit.can-author-close-audit';
$blocked = !PhabricatorEnv::getEnvConfig($config_key)
&& $this->isViewerCommitAuthor($object, $viewer);
if ($blocked) {
// do not offer or apply the accept transaction
} Prevention
- Hide the Accept action for authors when the config is off
- Run audits from a dedicated auditor account that never authors commits
When it happens
Trigger: The commit author clicks Accept on their own commit in the Diffusion audit UI, or automation applies an accept transaction using the authoring account.
Common situations: Solo developers wanting to close their own audits; bots that both author and audit with one identity; installs unaware the config toggle exists.
Related errors
- You can not raise a concern with this commit because you are
- You do not have permission to push to this repository.
- You can not accept this commit because you have already acce
- You can not raise a concern with this commit because you hav
- You can not resign from this commit because you are not an a
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/45974af5df0c871e.
Report an issue: GitHub.