Add debug logging to OAuth and login_required
This commit is contained in:
1 parent
82a63da8bc
commit
db5df8575f
1 file changed
+3
@@ -224,8 +224,11 @@ job_queue = {}
|
|||||||
def login_required(f):
|
def login_required(f):
|
||||||
@wraps(f)
|
@wraps(f)
|
||||||
def decorated_function(*args, **kwargs):
|
def decorated_function(*args, **kwargs):
|
||||||
|
print(f"DEBUG login_required: session = {dict(session)}")
|
||||||
if 'user' not in session and 'admin' not in session:
|
if 'user' not in session and 'admin' not in session:
|
||||||
|
print("DEBUG: No user or admin in session, redirecting to login")
|
||||||
return redirect(url_for('login'))
|
return redirect(url_for('login'))
|
||||||
|
print(f"DEBUG: User authenticated: {session.get('user', session.get('admin'))}")
|
||||||
return f(*args, **kwargs)
|
return f(*args, **kwargs)
|
||||||
return decorated_function
|
return decorated_function
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user