mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-02 20:40:51 -04:00
14 lines
318 B
Python
14 lines
318 B
Python
from functools import wraps
|
|
|
|
from flask import redirect, session, url_for
|
|
|
|
|
|
def redirect_to_sign_in(f):
|
|
@wraps(f)
|
|
def wrapped(*args, **kwargs):
|
|
if 'user_details' not in session:
|
|
return redirect(url_for('main.sign_in'))
|
|
else:
|
|
return f(*args, **kwargs)
|
|
return wrapped
|