{% extends "base.html" %} {% block title %}Roles & Branch Access{% endblock %} {% block content %}
| Name | Permissions | Active |
|---|---|---|
| {{ r.name }}
{% if r.description %} {{ r.description }} {% endif %} |
{{ r.permissions|join(', ') }} | {{ 'Yes' if r.is_active else 'No' }} |
No custom roles yet. Create one below — a user's custom role replaces their role preset for granular permission checks (server-side enforced).
{% endif %}| User | Home | Extra branches |
|---|---|---|
| {{ u.username }} | {{ u.branch.name if u.branch else '—' }} | {% set grants = access_map.get(u.id, []) %} {% if grants %} {% for b in branches if b.id in grants %}{{ b.name }}{% if not loop.last %}, {% endif %}{% endfor %} {% else %}—{% endif %} |