diff --git a/main.py b/main.py index 615b978..5d64051 100644 --- a/main.py +++ b/main.py @@ -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, diff --git a/templates/base.html b/templates/base.html index 7de8d07..f9f7b3b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -12,7 +12,7 @@

Getränkeliste

{% if user %}

- 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 %} – Logout

{% endif %} @@ -20,7 +20,7 @@
{% block content %}{% endblock %} {% if user %} - {% if 'Fachschaft' in user.groups %} + {% if 'Getraenkeliste Postpaid' in user.groups %}

Du bist Teil der Fachschaft Informatik.

{% if prepaid_users_from_curr_user %}

Liste deiner Prepaid-User:

@@ -76,7 +76,7 @@

Es sind keine Prepaid-User vorhanden.

{% endif %} {% endif %} - {% if 'Fachschaft Admins' in user.groups %} + {% if 'Getraenkeliste Verantwortliche' in user.groups %}

Admin Interface

Ausgleichszahlung:

Der eingegebene Betrag wird vom aktuell eingeloggten Nutzer abgezogen und dem eingetragenem Nutzer gutgeschrieben.

diff --git a/templates/index.html b/templates/index.html index 021856d..a1c1551 100644 --- a/templates/index.html +++ b/templates/index.html @@ -30,7 +30,7 @@ content %} Bitte begleiche deinen offenen Betrag! -{% endif %} {% if 'Fachschaft' in user.groups %} {% if db_user.money > -5000 %} +{% endif %} {% if 'Getraenkeliste Postpaid' in user.groups %} {% if db_user.money > -5000 %}