Page MenuHomePhabricator

D10480.id25198.diff
No OneTemporary

D10480.id25198.diff

Index: src/applications/people/query/PhabricatorPeopleQuery.php
===================================================================
--- src/applications/people/query/PhabricatorPeopleQuery.php
+++ src/applications/people/query/PhabricatorPeopleQuery.php
@@ -269,10 +269,11 @@
(int)$this->isApproved);
}
- if ($this->isSystemAgent) {
+ if ($this->isSystemAgent !== null) {
$where[] = qsprintf(
$conn_r,
- 'user.isSystemAgent = 1');
+ 'user.isSystemAgent = %d',
+ (int)$this->isSystemAgent);
}
if (strlen($this->nameLike)) {
Index: src/applications/people/query/PhabricatorPeopleSearchEngine.php
===================================================================
--- src/applications/people/query/PhabricatorPeopleSearchEngine.php
+++ src/applications/people/query/PhabricatorPeopleSearchEngine.php
@@ -24,6 +24,7 @@
$saved->setParameter('isDisabled', $request->getStr('isDisabled'));
$saved->setParameter('isSystemAgent', $request->getStr('isSystemAgent'));
$saved->setParameter('needsApproval', $request->getStr('needsApproval'));
+ $saved->setParameter('isNormal', $request->getStr('isNormal'));
$saved->setParameter('createdStart', $request->getStr('createdStart'));
$saved->setParameter('createdEnd', $request->getStr('createdEnd'));
@@ -66,6 +67,7 @@
$is_system_agent = $saved->getParameter('isSystemAgent');
$needs_approval = $saved->getParameter('needsApproval');
$no_disabled = $saved->getParameter('noDisabled');
+ $is_normal = $saved->getParameter('isNormal');
if ($is_admin) {
$query->withIsAdmin(true);
@@ -85,6 +87,12 @@
$query->withIsApproved(false);
}
+ if ($is_normal) {
+ $query->withIsDisabled(false);
+ $query->withIsSystemAgent(false);
+ $query->withIsApproved(true);
+ }
+
$start = $this->parseDateTime($saved->getParameter('createdStart'));
$end = $this->parseDateTime($saved->getParameter('createdEnd'));
@@ -112,6 +120,7 @@
$is_disabled = $saved->getParameter('isDisabled');
$is_system_agent = $saved->getParameter('isSystemAgent');
$needs_approval = $saved->getParameter('needsApproval');
+ $is_normal = $saved->getParameter('isNormal');
$form
->appendChild(
@@ -146,7 +155,12 @@
'needsApproval',
1,
pht('Show only users who need approval.'),
- $needs_approval));
+ $needs_approval)
+ ->addCheckbox(
+ 'isNormal',
+ 1,
+ pht('Show only approved users which are not disabled and are not bots.'),
+ $is_normal));
$this->appendCustomFieldsToForm($form, $saved);

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 29, 7:18 PM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704850
Default Alt Text
D10480.id25198.diff (2 KB)

Event Timeline