nouser require role

This commit is contained in:
CakeCN
2025-12-09 22:08:58 +08:00
parent ed6075a89c
commit 15cbeb93ee

View File

@@ -143,6 +143,7 @@ def desktop(user_uuid, course_id, chapter_name, lesson_name):
) )
@bp.route("/desktop_nouser/<course_id>/<chapter_name>/<lesson_name>") @bp.route("/desktop_nouser/<course_id>/<chapter_name>/<lesson_name>")
@require_role
def desktop_nouser(course_id, chapter_name, lesson_name): def desktop_nouser(course_id, chapter_name, lesson_name):
if "user_uuid" not in session: if "user_uuid" not in session:
return redirect(url_for("auth.login")) # 如果你有 auth 蓝图 return redirect(url_for("auth.login")) # 如果你有 auth 蓝图