Skip to content

Commit

Permalink
chore: Remove overridden user_info block
Browse files Browse the repository at this point in the history
This was overridden so we could show the user's login status in the user_info block: are they allowed to log in, or are they locked out?

This template change should have been in ckanext-password-policy all along and now it has been moved there, so we can delete this here.
  • Loading branch information
bellisk committed Jan 27, 2025
1 parent d676249 commit a1ac0af
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions ckanext/switzerland/templates/user/read_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,3 @@
{{ h.build_nav_icon('user.activity', _('Activity Stream'), id=user.name) }}
{% endif %}
{% 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://') %}
<dt>{{ _('Open ID') }}</dt>
<dd>{{ user.name|urlize(25) }}{# Be great if this just showed the domain #}</dd>
{% else %}
<dt>{{ _('Username') }}</dt>
<dd>{{ user.name }}</dd>
{% endif %}
</dl>
{% if is_myself %}
<dl>
<dt>{{ _('Email') }} <span class="label label-default" title="{{ _('This means only you can see this') }}">{{ _('Private') }}</span></dt>
<dd>{{ user.email }}</dd>
</dl>
{% endif %}
<dl>
<dt>{{ _('Member Since') }}</dt>
<dd>{{ h.render_datetime(user.created) }}</dd>
</dl>
<dl>
<dt>{{ _('State') }}</dt>
<dd>{{ _(user.state) }}, {{ _(login_status) }}</dd>
</dl>
{% if is_myself %}
<dl>
<dt class="key">{{ _('API Key') }} <span class="label label-default" title="{{ _('This means only you can see this') }}">{{ _('Private') }}</span></dt>
<dd class="value"><code>{{ user.apikey }}</code></dd>
</dl>
{% endif %}
</div>
{% endblock %}

0 comments on commit a1ac0af

Please sign in to comment.