mirror of https://github.com/zulip/zulip.git
support: Show role of the user in search result.
This commit is contained in:
parent
91f048c056
commit
38e7903425
|
@ -579,6 +579,7 @@ class TestSupportEndpoint(ZulipTestCase):
|
|||
"<h3>King Hamlet</h3>",
|
||||
"<b>Email</b>: hamlet@zulip.com",
|
||||
"<b>Is active</b>: True<br>",
|
||||
"<b>Role</b>: Member<br>",
|
||||
"<b>Admins</b>: desdemona@zulip.com, iago@zulip.com\n",
|
||||
'class="copy-button" data-copytext="desdemona@zulip.com, iago@zulip.com"',
|
||||
],
|
||||
|
@ -592,6 +593,18 @@ class TestSupportEndpoint(ZulipTestCase):
|
|||
"<h3>Othello, the Moor of Venice</h3>",
|
||||
"<b>Email</b>: othello@zulip.com",
|
||||
"<b>Is active</b>: True<br>",
|
||||
"<b>Role</b>: Member<br>",
|
||||
],
|
||||
result,
|
||||
)
|
||||
|
||||
def check_polonius_user_query_result(result: HttpResponse) -> None:
|
||||
self.assert_in_success_response(
|
||||
[
|
||||
"<h3>Polonius</h3>",
|
||||
"<b>Email</b>: polonius@zulip.com",
|
||||
"<b>Is active</b>: True<br>",
|
||||
"<b>Role</b>: Guest<br>",
|
||||
],
|
||||
result,
|
||||
)
|
||||
|
@ -731,6 +744,10 @@ class TestSupportEndpoint(ZulipTestCase):
|
|||
check_hamlet_user_query_result(result)
|
||||
check_zulip_realm_query_result(result)
|
||||
|
||||
result = self.client_get("/activity/support", {"q": self.example_email("polonius")})
|
||||
check_polonius_user_query_result(result)
|
||||
check_zulip_realm_query_result(result)
|
||||
|
||||
result = self.client_get("/activity/support", {"q": "lear"})
|
||||
check_lear_realm_query_result(result)
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<b>Email</b>: {{ user.email }}<br>
|
||||
<b>Date joined</b>: {{ user.date_joined|timesince }} ago<br>
|
||||
<b>Is active</b>: {{ user.is_active }}<br>
|
||||
<b>Is admin</b>: {{ user.is_realm_admin }}<br>
|
||||
<b>Role</b>: {{ user.get_role_name() }}<br>
|
||||
<hr>
|
||||
<div>
|
||||
{% include "analytics/realm_details.html" %}
|
||||
|
|
Loading…
Reference in New Issue