mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Make audit only add ccs or auditors if that was the user's intended action
Summary: this plugs this at the controller level. the editor could also be more aware of the "action" and the fix could be there. Test Plan: set some ccs, changed it to comment, made teh comment, noted no ccs. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1838 Differential Revision: https://secure.phabricator.com/D3590
This commit is contained in:
parent
52770a086d
commit
6b9b1d4f95
1 changed files with 15 additions and 2 deletions
|
@ -44,8 +44,21 @@ final class PhabricatorAuditAddCommentController
|
|||
->setAction($action)
|
||||
->setContent($request->getStr('content'));
|
||||
|
||||
$auditors = $request->getArr('auditors');
|
||||
$ccs = $request->getArr('ccs');
|
||||
// make sure we only add auditors or ccs if the action matches
|
||||
switch ($action) {
|
||||
case 'add_auditors':
|
||||
$auditors = $request->getArr('auditors');
|
||||
$ccs = array();
|
||||
break;
|
||||
case 'add_ccs':
|
||||
$auditors = array();
|
||||
$ccs = $request->getArr('ccs');
|
||||
break;
|
||||
default:
|
||||
$auditors = array();
|
||||
$ccs = array();
|
||||
break;
|
||||
}
|
||||
|
||||
id(new PhabricatorAuditCommentEditor($commit))
|
||||
->setUser($user)
|
||||
|
|
Loading…
Reference in a new issue