changeset 1412:9765ae56ee41

Fix Bug #183 Redirect user to the login page if not logged in
author George Peristerakis <peristerakis@gmail.com>
date Sat, 07 Jul 2012 06:22:51 -0400
parents ac1059572d80
children caa408751799
files MoinMoin/apps/frontend/views.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Fri Jun 29 16:04:11 2012 +0200
+++ b/MoinMoin/apps/frontend/views.py	Sat Jul 07 06:22:51 2012 -0400
@@ -1411,6 +1411,9 @@
     )
     forms = dict()
 
+    if not flaskg.user.valid:
+        return redirect(url_for('.login'))
+
     if request.method == 'POST':
         part = request.form.get('part')
         if part not in form_classes: