more self-explanatory roles + formatted_names for roles
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled

This commit is contained in:
2025-04-30 15:55:19 +02:00
parent b2e07653e6
commit 68cf563964
5 changed files with 56 additions and 15 deletions

View File

@ -60,9 +60,15 @@
Rollen:
<ul class="list-disc ms-4">
{% for role in user.proper_roles -%}
{% if not role.cluster %}
{% if not role.cluster and not role.hide_in_lists %}
<li>
<strong>{{ role.name }}:</strong> Hier folgt eine Beschreibung der Rolle
<strong>
{% if role.formatted_name %}
{{ role.formatted_name }}
{% else %}
{{ role.name }}
{% endif %}
</strong> {{ role.desc }}
{% if allowed_to_edit %}
<a href="/admin/user/{{ user.id }}/remove-role/{{ role.id }}"
onclick="return confirm('Willst du die Rolle \'{{ role.name }}\' von {{ user.name }} wirklich entfernen?');">🗑️</a>
@ -78,8 +84,12 @@
<fieldset>
<select name="role_id">
{% for role in roles %}
{% if not role.cluster and role not in user.proper_roles %}
<option value="{{ role.id }}">{{ role.name }}</option>
{% if not role.cluster and role not in user.proper_roles and not role.hide_in_lists %}
<option value="{{ role.id }}">{% if role.formatted_name %}
{{ role.formatted_name }}
{% else %}
{{ role.name }}
{% endif %} {% if role.desc %} ({{ role.desc }}) {% endif %}</option>
{% endif %}
{% endfor %}
</select>