Merge "users: Correct lock_password status visibility (Yes/No) in user details" into stable/ussuri

This commit is contained in:
Zuul 2020-10-28 16:05:41 +00:00 committed by Gerrit Code Review
commit 8b39bf28c1
2 changed files with 2 additions and 2 deletions

View File

@ -76,11 +76,13 @@ class OverviewTab(tabs.Tab):
def get_context_data(self, request):
user = self.tab_group.kwargs['user']
options = getattr(user, 'options', {})
return {
"user": user,
"domain_name": self._get_domain_name(user),
'extras': self._get_extras(user),
'project_name': self._get_project_name(user),
'lock_password': options.get('lock_password', False),
}

View File

@ -211,8 +211,6 @@ class DetailView(tabs.TabView):
context["user"] = user
context["url"] = self.get_redirect_url()
context["actions"] = table.render_row_actions(user)
options = getattr(user, "options", {})
context["lock_password"] = options.get("lock_password", False)
return context
@memoized.memoized_method