support: Show the actual user email in /support.

This commit is contained in:
Vishnu KS 2021-03-19 21:27:23 +05:30 committed by Tim Abbott
parent 38e7903425
commit a404711740
2 changed files with 10 additions and 2 deletions

View File

@ -12,7 +12,11 @@ from analytics.models import FillState, RealmCount, UserCount
from analytics.views import rewrite_client_arrays, sort_by_totals, sort_client_labels
from corporate.lib.stripe import add_months, update_sponsorship_status
from corporate.models import Customer, CustomerPlan, LicenseLedger, get_customer_by_realm
from zerver.lib.actions import do_create_multiuse_invite_link, do_send_realm_reactivation_email
from zerver.lib.actions import (
do_create_multiuse_invite_link,
do_send_realm_reactivation_email,
do_set_realm_property,
)
from zerver.lib.test_classes import ZulipTestCase
from zerver.lib.test_helpers import reset_emails_in_zulip_realm
from zerver.lib.timestamp import ceiling_to_day, ceiling_to_hour, datetime_to_timestamp
@ -717,6 +721,10 @@ class TestSupportEndpoint(ZulipTestCase):
self.login("iago")
do_set_realm_property(
get_realm("zulip"), "email_address_visibility", Realm.EMAIL_ADDRESS_VISIBILITY_NOBODY
)
customer = Customer.objects.create(realm=get_realm("lear"), stripe_customer_id="cus_123")
now = datetime(2016, 1, 2, tzinfo=timezone.utc)
plan = CustomerPlan.objects.create(

View File

@ -37,7 +37,7 @@
<div class="support-query-result new-style">
<span class="label">user</span>
<h3>{{ user.full_name }}</h3>
<b>Email</b>: {{ user.email }}<br>
<b>Email</b>: {{ user.delivery_email }}<br>
<b>Date joined</b>: {{ user.date_joined|timesince }} ago<br>
<b>Is active</b>: {{ user.is_active }}<br>
<b>Role</b>: {{ user.get_role_name() }}<br>