backend overhaul
This commit is contained in:
18 files changed
+1824
-1747
No files matched your search
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Authentication helpers.
|
||||
|
||||
Kept in its own module so both app.py (context processor) and routes/admin.py
|
||||
(route guards) can import is_admin() without circular imports.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from flask import session as flask_session
|
||||
|
||||
|
||||
def is_admin() -> bool:
|
||||
return bool(flask_session.get("is_admin"))
|
||||
Reference in new issue
Block a user