1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 12:00:55 +01: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:
Bob Trahan 2014-04-04 12:25:03 -07:00
parent 496a7d8967
commit f67a853fe7
3 changed files with 11 additions and 3 deletions

View file

@ -778,9 +778,9 @@ final class DiffusionCommitController extends DiffusionController {
'dynamic' => array(
'add-auditors-tokenizer' => array(
'actions' => array('add_auditors' => 1),
'src' => '/typeahead/common/usersorprojects/',
'src' => '/typeahead/common/usersprojectsorpackages/',
'row' => 'add-auditors',
'placeholder' => pht('Type a user or project name...'),
'placeholder' => pht('Type a user, project, or package name...'),
),
'add-ccs-tokenizer' => array(
'actions' => array('add_ccs' => 1),

View file

@ -73,6 +73,11 @@ final class PhabricatorTypeaheadCommonDatasourceController
$need_users = true;
$need_projs = true;
break;
case 'usersprojectsorpackages':
$need_users = true;
$need_projs = true;
$need_packages = true;
break;
case 'repositories':
$need_repos = true;
break;
@ -309,6 +314,7 @@ final class PhabricatorTypeaheadCommonDatasourceController
$packages = id(new PhabricatorOwnersPackage())->loadAll();
foreach ($packages as $package) {
$results[] = id(new PhabricatorTypeaheadResult())
->setIcon('pl-testplan')
->setName($package->getName())
->setURI('/owners/package/'.$package->getID().'/')
->setPHID($package->getPHID());

View file

@ -94,9 +94,11 @@ final class AphrontFormTokenizerControl extends AphrontFormControl {
'projects' => pht('Type a project name...'),
'repositories' => pht('Type a repository name...'),
'packages' => pht('Type a package name...'),
'macros' => pht('Type a macro name...'),
'arcanistproject' => pht('Type an arc 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);