mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
bug fix: Allow admins to filter users in settings.
It appears c28c3015 caused a regression where we
set `email` to undefined if a user does not have
`delivery_email` set, and this causes filtering
of users to fail for admins doing user settings.
This fixes only one of the issues reported in
issue #13554.
There's probably no easy fix to scrolling taking
long, but I think fixing search will mostly
address that complaint.
The Rust folks seem to agree with me that the
search results are too noisy. If I search for
"s" I get:
* names like Steve (good)
* names like Jesse (noisy)
* anybody with s in their email (super noisy)
Here is the relevant code:
return (
item.full_name.toLowerCase().indexOf(value) >= 0 ||
email.toLowerCase().indexOf(value) >= 0
);
This commit is contained in:
@@ -222,7 +222,7 @@ function populate_users(realm_people_data) {
|
||||
element: $users_table.closest(".settings-section").find(".search"),
|
||||
callback: function (item, value) {
|
||||
let email = item.email;
|
||||
if (page_params.is_admin) {
|
||||
if (page_params.is_admin && item.delivery_email) {
|
||||
email = item.delivery_email;
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ function populate_users(realm_people_data) {
|
||||
element: $deactivated_users_table.closest(".settings-section").find(".search"),
|
||||
callback: function (item, value) {
|
||||
let email = item.email;
|
||||
if (page_params.is_admin) {
|
||||
if (page_params.is_admin && item.delivery_email) {
|
||||
email = item.delivery_email;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user