Skip to content

Commit

Permalink
feat: Show user's login status (enabled or locked out)
Browse files Browse the repository at this point in the history
  • Loading branch information
bellisk committed Jul 31, 2024
1 parent f73792d commit 50181e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ckanext/switzerland/templates/user/read_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
{% endblock %}

{% block user_info %}
{% if h.user_locked_out(user.name) %}
{% set login_status = 'locked out' %}
{% else %}
{% set login_status = 'login enabled' %}
{% endif %}
<div class="info">
<dl>
{% if user.name.startswith('http://') or user.name.startswith('https://') %}
Expand All @@ -31,7 +36,7 @@
</dl>
<dl>
<dt>{{ _('State') }}</dt>
<dd>{{ _(user.state) }}</dd>
<dd>{{ _(user.state) }}, {{ _(login_status) }}</dd>
</dl>
{% if is_myself %}
<dl>
Expand Down

0 comments on commit 50181e3

Please sign in to comment.