diff options
Diffstat (limited to 'nfsw/auth.py')
-rw-r--r-- | nfsw/auth.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nfsw/auth.py b/nfsw/auth.py index d540a9a..769a5dd 100644 --- a/nfsw/auth.py +++ b/nfsw/auth.py @@ -38,3 +38,14 @@ def anon_only(view): return wrapped_view +def not_agreed(view): + @functools.wraps(view) + def wrapped_view(**kwargs): + if g.user['terms_agreed']: + return redirect(url_for('io')) + + return view(**kwargs) + + return wrapped_view + + |