From b587865ce78af2213ea5037edc0829a2406ee869 Mon Sep 17 00:00:00 2001 From: Valerio Bozzolan Date: Sat, 8 Apr 2023 09:45:05 +0200 Subject: [PATCH] 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 --- .../people/query/PhabricatorPeopleSearchEngine.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applications/people/query/PhabricatorPeopleSearchEngine.php b/src/applications/people/query/PhabricatorPeopleSearchEngine.php index 57ed133df4..bdeab953ec 100644 --- a/src/applications/people/query/PhabricatorPeopleSearchEngine.php +++ b/src/applications/people/query/PhabricatorPeopleSearchEngine.php @@ -200,6 +200,7 @@ final class PhabricatorPeopleSearchEngine protected function getBuiltinQueryNames() { $names = array( 'active' => pht('Active'), + 'admin' => pht('Administrators'), 'all' => pht('All'), ); @@ -221,6 +222,9 @@ final class PhabricatorPeopleSearchEngine case 'active': return $query ->setParameter('isDisabled', false); + case 'admin': + return $query + ->setParameter('isAdmin', true); case 'approval': return $query ->setParameter('needsApproval', true)