[Mpuls-commits] r3006 - in base/trunk: . mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Jun 14 12:55:57 CEST 2010
Author: bh
Date: 2010-06-14 12:55:57 +0200 (Mon, 14 Jun 2010)
New Revision: 3006
Modified:
base/trunk/ChangeLog
base/trunk/mpulsweb/lib/base.py
Log:
* mpulsweb/lib/base.py (BaseController.__before__): Add config
option for the url to which clients that are not logged in are
redirected. This is useful for JMD where we have two MPuls
applications which should share the login pages, so the default
intra-application links do not work.
Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog 2010-06-14 09:20:38 UTC (rev 3005)
+++ base/trunk/ChangeLog 2010-06-14 10:55:57 UTC (rev 3006)
@@ -1,5 +1,13 @@
2010-06-14 Bernhard Herzog <bh at intevation.de>
+ * mpulsweb/lib/base.py (BaseController.__before__): Add config
+ option for the url to which clients that are not logged in are
+ redirected. This is useful for JMD where we have two MPuls
+ applications which should share the login pages, so the default
+ intra-application links do not work.
+
+2010-06-14 Bernhard Herzog <bh at intevation.de>
+
* mpulsweb/model/case.py (Field.__repr__): Added for more
informative debug logs
(MpulsCase.__getattr__): Improve debug log contents.
Modified: base/trunk/mpulsweb/lib/base.py
===================================================================
--- base/trunk/mpulsweb/lib/base.py 2010-06-14 09:20:38 UTC (rev 3005)
+++ base/trunk/mpulsweb/lib/base.py 2010-06-14 10:55:57 UTC (rev 3006)
@@ -35,9 +35,11 @@
from webob.exc import HTTPUnauthorized, HTTPNotFound
+from routes import url_for
+
from pylons import c, config, g, request, response, session
from pylons.controllers import WSGIController
-from pylons.controllers.util import redirect_to
+from pylons.controllers.util import redirect_to, redirect
#from mpulsweb.lib.translation import _
#from pylons.templating import render_mako as render
from pylons.templating import cached_template, pylons_globals
@@ -197,7 +199,8 @@
except KeyError:
p = str(request.path_info)
if not p in ('/auth/login', '/auth/loginAction'):
- redirect_to(controller='/auth', action='login')
+ redirect(config.get("mpuls.auth.login_url")
+ or url_for(controller='/auth', action='login'))
def __call__(self, environ, start_response):
"""Invoke the Controller"""
More information about the Mpuls-commits
mailing list