[z3-checkins] r54768 - z3/deliverance/DeliveranceVHoster/trunk/dvhoster

magicbronson at codespeak.net magicbronson at codespeak.net
Thu May 15 23:21:15 CEST 2008


Author: magicbronson
Date: Thu May 15 23:21:14 2008
New Revision: 54768

Modified:
   z3/deliverance/DeliveranceVHoster/trunk/dvhoster/wsgiapp.py
Log:
- use new auth_enabled setting to conditionally load eyvind
- AuthenticationMiddleware method was renamed make_auth_middleware

Modified: z3/deliverance/DeliveranceVHoster/trunk/dvhoster/wsgiapp.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/dvhoster/wsgiapp.py	(original)
+++ z3/deliverance/DeliveranceVHoster/trunk/dvhoster/wsgiapp.py	Thu May 15 23:21:14 2008
@@ -7,7 +7,7 @@
 from paste.exceptions.errormiddleware import ErrorMiddleware
 from dvhoster.dispatcher import DeliveranceDispatcher
 from dvhoster.scrubber import EnvironScrubber
-from eyvind.lib.authmiddleware import AuthenticationMiddleware
+from eyvind.lib.authmiddleware import make_auth_middleware
 from dvhoster.custom_error import CustomErrorHTTPExceptionHandler
 
 import transcluder
@@ -27,7 +27,11 @@
         app = _create_transcluder(app, app_conf)
 
     app = RecursiveMiddleware(app)
-    app = AuthenticationMiddleware(app, app_conf)
+
+    auth_enabled = asbool(app_conf.get('auth_enabled', True))
+    if auth_enabled:
+        app = make_auth_middleware(app, app_conf)
+
     app = EnvironScrubber(app, app_conf)
     app = RegistryManager(app)
     debug = app_conf['debug'] = asbool(app_conf.get('debug', global_conf.get('debug')))


More information about the z3-checkins mailing list