mirror of
https://we.phorge.it/source/phorge.git
synced 2025-04-04 16:38:24 +02:00
Audit - add ability to add a package as an auditor
Summary: Fixes T4687. This was also pretty easy...! Test Plan: made a package with a test user as owner. added package as owner. looked right on commit page. logged in as test user and verified audit showed up on home page. Reviewers: epriestley Reviewed By: epriestley Subscribers: chad, epriestley, Korvin Maniphest Tasks: T4687 Differential Revision: https://secure.phabricator.com/D8705
This commit is contained in:
parent
496a7d8967
commit
f67a853fe7
3 changed files with 11 additions and 3 deletions
|
@ -778,9 +778,9 @@ final class DiffusionCommitController extends DiffusionController {
|
||||||
'dynamic' => array(
|
'dynamic' => array(
|
||||||
'add-auditors-tokenizer' => array(
|
'add-auditors-tokenizer' => array(
|
||||||
'actions' => array('add_auditors' => 1),
|
'actions' => array('add_auditors' => 1),
|
||||||
'src' => '/typeahead/common/usersorprojects/',
|
'src' => '/typeahead/common/usersprojectsorpackages/',
|
||||||
'row' => 'add-auditors',
|
'row' => 'add-auditors',
|
||||||
'placeholder' => pht('Type a user or project name...'),
|
'placeholder' => pht('Type a user, project, or package name...'),
|
||||||
),
|
),
|
||||||
'add-ccs-tokenizer' => array(
|
'add-ccs-tokenizer' => array(
|
||||||
'actions' => array('add_ccs' => 1),
|
'actions' => array('add_ccs' => 1),
|
||||||
|
|
|
@ -73,6 +73,11 @@ final class PhabricatorTypeaheadCommonDatasourceController
|
||||||
$need_users = true;
|
$need_users = true;
|
||||||
$need_projs = true;
|
$need_projs = true;
|
||||||
break;
|
break;
|
||||||
|
case 'usersprojectsorpackages':
|
||||||
|
$need_users = true;
|
||||||
|
$need_projs = true;
|
||||||
|
$need_packages = true;
|
||||||
|
break;
|
||||||
case 'repositories':
|
case 'repositories':
|
||||||
$need_repos = true;
|
$need_repos = true;
|
||||||
break;
|
break;
|
||||||
|
@ -309,6 +314,7 @@ final class PhabricatorTypeaheadCommonDatasourceController
|
||||||
$packages = id(new PhabricatorOwnersPackage())->loadAll();
|
$packages = id(new PhabricatorOwnersPackage())->loadAll();
|
||||||
foreach ($packages as $package) {
|
foreach ($packages as $package) {
|
||||||
$results[] = id(new PhabricatorTypeaheadResult())
|
$results[] = id(new PhabricatorTypeaheadResult())
|
||||||
|
->setIcon('pl-testplan')
|
||||||
->setName($package->getName())
|
->setName($package->getName())
|
||||||
->setURI('/owners/package/'.$package->getID().'/')
|
->setURI('/owners/package/'.$package->getID().'/')
|
||||||
->setPHID($package->getPHID());
|
->setPHID($package->getPHID());
|
||||||
|
|
|
@ -94,9 +94,11 @@ final class AphrontFormTokenizerControl extends AphrontFormControl {
|
||||||
'projects' => pht('Type a project name...'),
|
'projects' => pht('Type a project name...'),
|
||||||
'repositories' => pht('Type a repository name...'),
|
'repositories' => pht('Type a repository name...'),
|
||||||
'packages' => pht('Type a package name...'),
|
'packages' => pht('Type a package name...'),
|
||||||
|
'macros' => pht('Type a macro name...'),
|
||||||
'arcanistproject' => pht('Type an arc project name...'),
|
'arcanistproject' => pht('Type an arc project name...'),
|
||||||
'accountsorprojects' => pht('Type a user or project name...'),
|
'accountsorprojects' => pht('Type a user or project name...'),
|
||||||
'macros' => pht('Type a macro name...'),
|
'usersprojectsorpackages' =>
|
||||||
|
pht('Type a user, project, or package name...'),
|
||||||
);
|
);
|
||||||
|
|
||||||
return idx($map, $request);
|
return idx($map, $request);
|
||||||
|
|
Loading…
Add table
Reference in a new issue