admin: bruger- og gruppe-administration (opret bruger m. gruppe-adgang, medlemsstyring)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
agw
2026-06-11 21:20:00 +02:00
co-authored by Claude Opus 4.8
parent dfe500c178
commit 7cf79fa901
7 changed files with 286 additions and 13 deletions
+19
View File
@@ -0,0 +1,19 @@
{% extends "base.html" %}
{% block title %}Admin — grupper{% endblock %}
{% block body %}
<h1>Grupper</h1>
<p class="lead">Grupper styrer hvilke services brugere har adgang til. Bind en app til en gruppe i Authentik, og alle i gruppen får adgang.</p>
{% if saved %}<div class="flash">{{ saved }}</div>{% endif %}
<form method="post" action="/admin/groups" style="display:flex;gap:.6rem;align-items:end;margin:1rem 0;max-width:28rem">
<label style="flex:1">Ny gruppe<input name="name" required autocomplete="off" placeholder="fx Familie"></label>
<button class="btn" type="submit">Opret</button>
</form>
<table>
<thead><tr><th>Gruppe</th><th>Medlemmer</th><th></th></tr></thead>
<tbody>
{% for g in groups %}
<tr><td><strong>{{ g.name }}</strong></td><td class="muted">{{ g.members }}</td><td><a href="/admin/groups/{{ g.pk }}">Medlemmer →</a></td></tr>
{% endfor %}
</tbody>
</table>
{% endblock %}