1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 00:32:42 +01:00

People: add a permalink to list Administrators

Summary:
This change introduces a builting query to easily list
Administrators of your beautiful Phorge instance:

{F277912}

Note that any builtin query can be disabled anytime or
reordered, so this is not a problem if you already have
a similar saved query. But probably you have not.

The goal is not to just "have a link" (this was already
possible) but to have a predictable link to be used in
any instance-agnostic document, including but not
limited to Diviner or Phorge's user interface messages.

Closes T15238

Test Plan: Visit /people/query/admin/ and enjoy.

Reviewers: O1 Blessed Committers, Cigaryno, Matthew

Reviewed By: O1 Blessed Committers, Cigaryno, Matthew

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15238

Differential Revision: https://we.phorge.it/D25116
This commit is contained in:
Valerio Bozzolan 2023-04-08 09:45:05 +02:00
parent dad1b15a9c
commit b587865ce7

View file

@ -200,6 +200,7 @@ final class PhabricatorPeopleSearchEngine
protected function getBuiltinQueryNames() { protected function getBuiltinQueryNames() {
$names = array( $names = array(
'active' => pht('Active'), 'active' => pht('Active'),
'admin' => pht('Administrators'),
'all' => pht('All'), 'all' => pht('All'),
); );
@ -221,6 +222,9 @@ final class PhabricatorPeopleSearchEngine
case 'active': case 'active':
return $query return $query
->setParameter('isDisabled', false); ->setParameter('isDisabled', false);
case 'admin':
return $query
->setParameter('isAdmin', true);
case 'approval': case 'approval':
return $query return $query
->setParameter('needsApproval', true) ->setParameter('needsApproval', true)