mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
Require commit identities when editing commits to resolve an issue with audit actions not applying properly
Summary: See <https://discourse.phabricator-community.org/t/cannot-audit-a-git-commit/2848>. In D20581, I made some audit behavior dependent upon identities, but the actual edit flow doesn't load them. This can cause us to raise an "attach identities first" exception in the bowels of the edit workflow and trigger unexpected behavior at top level. Load identities when editing a commit so that the transaction flows have access to identity information and can use it to figure out if a user is an author, etc. Test Plan: - As an auditor, applied an "Accept Commit" action to an open audit after D20581. - Before patch: accept no-ops internally since the preconditions throw. - After patch: accept works properly. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D20612
This commit is contained in:
parent
ca56e8590a
commit
75c3598359
1 changed files with 2 additions and 1 deletions
|
@ -48,7 +48,8 @@ final class DiffusionCommitEditEngine
|
|||
return id(new DiffusionCommitQuery())
|
||||
->needCommitData(true)
|
||||
->needAuditRequests(true)
|
||||
->needAuditAuthority(array($viewer));
|
||||
->needAuditAuthority(array($viewer))
|
||||
->needIdentities(true);
|
||||
}
|
||||
|
||||
protected function getEditorURI() {
|
||||
|
|
Loading…
Reference in a new issue