Display user's description in user detail

In the case of using keystone v3, user's description is
displayed in user list, but it is not displayed in user
detail. I think we should display just like a user list.

Change-Id: I113a8e5060481b6715acfa936c21ebdc0f4aae29
Closes-Bug: #1522655
This commit is contained in:
kenji-ishii 2015-12-04 19:41:24 +09:00
parent eae45b143c
commit bf8f8702de
2 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,10 @@
{% endif %} {% endif %}
<dt>{% trans "User Name" %}</dt> <dt>{% trans "User Name" %}</dt>
<dd>{{ user.name }}</dd> <dd>{{ user.name }}</dd>
{% if description %}
<dt>{% trans "Description" %}</dt>
<dd>{{ description }}</dd>
{% endif %}
<dt>{% trans "ID" %}</dt> <dt>{% trans "ID" %}</dt>
<dd>{{ user.id }}</dd> <dd>{{ user.id }}</dd>
<dt>{% trans "Email" %}</dt> <dt>{% trans "Email" %}</dt>

View File

@ -181,6 +181,7 @@ class DetailView(views.HorizonTemplateView):
except Exception: except Exception:
exceptions.handle(self.request, exceptions.handle(self.request,
_('Unable to retrieve project domain.')) _('Unable to retrieve project domain.'))
context["description"] = getattr(user, "description", _("None"))
context["user"] = user context["user"] = user
if tenant: if tenant: