{% extends "admin/base_site.html" %} {% load i18n %} {% block title %}{{ title }} | {{ site_title|default:"Django site admin" }}{% endblock %} {% block extrastyle %}{{ block.super }} {% endblock %} {% block content %}

{% blocktranslate trimmed %} One cell per role and action: the rows that role may reach. A locked cell is declared in KARNI_ROLES for a system role and changes only there. Nothing is saved until you review the diff. {% endblocktranslate %} {% translate "Effective permissions for a user" %}

{% csrf_token %}
{% for role in matrix.roles %} {% endfor %} {% for group in table %} {% for role in matrix.roles %}{% endfor %} {% for row in group.actions %} {% for cell in row.cells %} {% endfor %} {% endfor %} {% empty %} {% endfor %}
{% translate "Model / action" %}
{{ role.name }} ({{ role.slug }}{% if role.is_system %}, {% translate "system" %}{% endif %})
{% if can_edit %} {% endif %}
{{ group.model.name|capfirst }} {{ group.model.label }} {% if can_edit %} {% endif %}
{{ row.action }} {% if cell.locked %} 🔒 {% translate "declared" %} {% elif cell.origin == "matrix" %} {% translate "set here" %}{% if cell.declared %} · {% translate "declared" %}: {{ cell.declared }}{% endif %} {% elif cell.origin == "declared" %} {% translate "declared" %} {% endif %}
{% translate "No models to grant: every app is excluded by KARNI_MATRIX_EXCLUDE." %}
{% if can_edit %}
{% translate "You will see the diff before anything is saved." %}
{% else %}

{% translate "You may view this matrix but not change it (karni_accounts.rolepermission:change)." %}

{% endif %}

{% translate "Recent changes" %}

{% if recent %} {% for entry in recent %} {% endfor %}
{% translate "When" %}{% translate "Who" %}{% translate "Role" %}{% translate "Permission" %}{% translate "Change" %}
{{ entry.timestamp|date:"DATETIME_FORMAT" }} {% if entry.actor %}{{ entry.actor.get_username }}{% else %}—{% endif %} {{ entry.role }} {{ entry.permission }} {{ entry.before|default:"—" }} → {{ entry.after|default:"—" }}
{% else %}

{% translate "No grant has been changed yet." %}

{% endif %}
{% endblock %}