From 016ec933e603dd8609906ccd5878ef152bd9f140 Mon Sep 17 00:00:00 2001 From: "XPS\\Micro" Date: Sat, 31 Jan 2026 17:05:45 +0100 Subject: [PATCH] fix: update legacy web routes to use slug instead of username - Fix /dashboard route to use current_user.slug for service_url - Fix /container/restart route to pass current_user.slug to spawn_container() - Ensures legacy Flask-Login routes work with passwordless authentication --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 17a5b82..fe28ea9 100644 --- a/app.py +++ b/app.py @@ -83,7 +83,7 @@ def dashboard(): # Service-URL für den User (pfad-basiert) scheme = app.config['PREFERRED_URL_SCHEME'] spawner_domain = f"{app.config['SPAWNER_SUBDOMAIN']}.{app.config['BASE_DOMAIN']}" - service_url = f"{scheme}://{spawner_domain}/{current_user.username}" + service_url = f"{scheme}://{spawner_domain}/{current_user.slug}" return render_template('dashboard.html', user=current_user, @@ -103,7 +103,7 @@ def restart_container(): # Neuen Container starten try: - container_id, port = container_mgr.spawn_container(current_user.id, current_user.username) + container_id, port = container_mgr.spawn_container(current_user.id, current_user.slug) current_user.container_id = container_id current_user.container_port = port db.session.commit()