Change Group names

This commit is contained in:
2025-06-02 11:24:05 +02:00
parent ecba2331ef
commit c9c6e3cc7d
3 changed files with 7 additions and 6 deletions

View File

@@ -25,8 +25,8 @@ from auth import oidc
ADMIN_GROUP = "Fachschaft Admins"
FS_GROUP = "Fachschaft"
ADMIN_GROUP = "Getraenkeliste Verantwortliche"
FS_GROUP = "Getraenkeliste Postpaid"
app = FastAPI()
app.add_middleware(SessionMiddleware, secret_key="my_secret_key")
@@ -94,6 +94,7 @@ def home(request: Request):
db_user = get_postpaid_user(user_db_id)
except KeyError:
db_user = get_postpaid_user(user_db_id)
return templates.TemplateResponse("index.html", {
"request": request,
"user": user_authentik,

View File

@@ -12,7 +12,7 @@
<h1>Getränkeliste</h1>
{% if user %}
<p>
Angemeldet als {{ user.preferred_username }}{% if 'Fachschaft Admins' in user.groups %} (Admin){% endif %}
Angemeldet als {{ user.preferred_username }}{% if 'Getraenkeliste Verantwortliche' in user.groups %} (Admin){% endif %}
<a href="/logout">Logout</a>
</p>
{% endif %}
@@ -20,7 +20,7 @@
<main>
{% block content %}{% endblock %}
{% if user %}
{% if 'Fachschaft' in user.groups %}
{% if 'Getraenkeliste Postpaid' in user.groups %}
<p>Du bist Teil der Fachschaft Informatik.</p>
{% if prepaid_users_from_curr_user %}
<p>Liste deiner Prepaid-User:</p>
@@ -76,7 +76,7 @@
<p>Es sind keine Prepaid-User vorhanden.</p>
{% endif %}
{% endif %}
{% if 'Fachschaft Admins' in user.groups %}
{% if 'Getraenkeliste Verantwortliche' in user.groups %}
<h2>Admin Interface</h2>
<p>Ausgleichszahlung:</p>
<p>Der eingegebene Betrag wird vom aktuell eingeloggten Nutzer abgezogen und dem eingetragenem Nutzer gutgeschrieben.</p>

View File

@@ -30,7 +30,7 @@ content %}
Bitte begleiche deinen offenen Betrag!
</span>
</div>
{% endif %} {% if 'Fachschaft' in user.groups %} {% if db_user.money > -5000 %}
{% endif %} {% if 'Getraenkeliste Postpaid' in user.groups %} {% if db_user.money > -5000 %}
<div style="display: flex; justify-content: center; text-align: center">
<form method="post" action="/drink">
<button