Commit 39afbfee authored by Olga Brani's avatar Olga Brani Committed by Athina Bekakou

admin: Show user pending/accepted email

User accepted email is visible only if it is different than the current
email.
parent a29b9540
......@@ -116,6 +116,14 @@ class UserJSONView(AdminJSONView):
def add_verbose_data(self, inst):
extra_dict = OrderedDict()
if inst.email_change_is_pending():
extra_dict['pending_email'] = {
'display_name': "E-mail pending verification",
'value': inst.emailchanges.all()[0].new_email_address,
'visible': True,
}
extra_dict['status'] = {
'display_name': "Status",
'value': inst.status_display,
......
......@@ -12,7 +12,6 @@
<span class="label">{{ user.email }}</span>
</span>
</h4>
<div class="object-details-content">
<ul class="nav nav-tabs">
<li class="active"><a href="#details{{ user.uuid }}" data-toggle="tab">Details</a></li>
......@@ -28,7 +27,16 @@
<dt>ID</dt><dd>{{ user.id }}</dd>
<dt>UUID</dt><dd>{{ user.uuid }}</dd>
<dt>Name</dt><dd>{{ user.realname }}</dd>
<dt>Email</dt><dd>{{ user.email }}</dd>
<dt>E-mail</dt><dd>{{ user.email }}</dd>
{% if user.accepted_email and user.email != user.accepted_email %}
<dt>Initially accepted e-mail</dt><dd>{{ user.accepted_email }}</dd>
{% endif %}
{% if user.email_change_is_pending %}
<dt>E-mail pending verification</dt>
<dd>{{ user.emailchanges.all.0.new_email_address }}
<dt>E-mail change requested at</dt>
<dd>{{ user.emailchanges.all.0.requested_at }}
{% endif %}
<dt>Status</dt><dd>{{ user.status_display|upper }}</dd>
<dt>Groups</dt><dd>{{ user|get_groups }}</dd>
</dl>
......@@ -60,7 +68,6 @@
{% for auth in user.auth_providers.all %}
<dd>{{ auth.module }} : {{ auth.last_login_at|default:"-"}}</dd>
{% endfor %}
</dl>
</div>
<div class="tab-pane" id="auth{{ user.uuid }}">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment