[Mpuls-commits] r2874 - in base/trunk: . mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jun 3 13:21:55 CEST 2010
Author: bh
Date: 2010-06-03 13:21:54 +0200 (Thu, 03 Jun 2010)
New Revision: 2874
Modified:
base/trunk/ChangeLog
base/trunk/mpulsweb/lib/base.py
Log:
* mpulsweb/lib/base.py (BaseController.__before__): Use
request.path_info, not request.path, when checking whether to the
user is already accessing a page we want to redirect to. This
avoid infinite redirects when the application is mounted under a
non-empty prefix.
Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog 2010-06-03 10:21:43 UTC (rev 2873)
+++ base/trunk/ChangeLog 2010-06-03 11:21:54 UTC (rev 2874)
@@ -1,5 +1,13 @@
2010-06-03 Bernhard Herzog <bh at intevation.de>
+ * mpulsweb/lib/base.py (BaseController.__before__): Use
+ request.path_info, not request.path, when checking whether to the
+ user is already accessing a page we want to redirect to. This
+ avoid infinite redirects when the application is mounted under a
+ non-empty prefix.
+
+2010-06-03 Bernhard Herzog <bh at intevation.de>
+
* mpulsweb/lib/db.py (DB.__init__): Rename parameter and instance
variable dbname to database. This is a bit less confusing,
because "dbname" is used in other parts of the MPuls code base for
Modified: base/trunk/mpulsweb/lib/base.py
===================================================================
--- base/trunk/mpulsweb/lib/base.py 2010-06-03 10:21:43 UTC (rev 2873)
+++ base/trunk/mpulsweb/lib/base.py 2010-06-03 11:21:54 UTC (rev 2874)
@@ -167,13 +167,14 @@
log.debug('User accound activated: %s' % user.isActivated())
log.debug('User needs new pass: %s' % user.needsNewPass())
if (not user.isActivated() and
- request.path not in ['/auth/accountDeactivated']):
+ request.path_info not in ['/auth/accountDeactivated']):
redirect_to('/auth/accountDeactivated')
# Do the user needs to change his passwort?
elif (user.needsNewPass() and
- request.path not in ['/usersettings/changePasswordOnLogin',
- '/usersettings/changePasswordOnLoginAction']):
+ request.path_info not in
+ ['/usersettings/changePasswordOnLogin',
+ '/usersettings/changePasswordOnLoginAction']):
redirect_to('/usersettings/changePasswordOnLogin')
except KeyError:
More information about the Mpuls-commits
mailing list