{% load i18n %}

<h4>
  {% if misago_user.is_authenticated %}
    {% blocktrans trimmed with user=misago_user.username context "debug toolbar user acl" %}
    {{ user }} roles
    {% endblocktrans %}
  {% else %}
    {% trans "Anonymous roles" context "debug toolbar user acl" %}
  {% endif %}
</h4>
<table>
  <thead>
    <tr>
      <th style="width: 180px;">{% trans "Role" context "debug toolbar user acl" %}</th>
      <th>{% trans "Permissions" context "debug toolbar user acl" %}</th>
    </tr>
  </thead>
  <tbody>
    {% for role in misago_user.get_roles %}
      <tr>
        <td>{{ role }}</td>
        <td>{{ role.permissions }}</td>
      </tr>
    {% endfor %}
  </tbody>
</table>


<h4>{% trans "Current ACL" context "debug toolbar user acl" %}</h4>
<table>
  <thead>
    <tr>
      <th style="width: 180px;">{% trans "Key" context "debug toolbar user acl" %}</th>
      <th>{% trans "Value" context "debug toolbar user acl" %}</th>
    </tr>
  </thead>
  <tbody>
    {% for key, value in misago_acl.items %}
      <tr>
        <td>{{ key }}</td>
        <td>{{ value }}</td>
      </tr>
    {% endfor %}
  </tbody>
</table>
