]> asedeno.scripts.mit.edu Git - bluechips.git/blobdiff - bluechips/config/middleware.py
Introduce a new "noauth" config option and deprecate fake_username.
[bluechips.git] / bluechips / config / middleware.py
index a5fdaaf1b93d6c358e81ad3992860fd0bd216842..e52eb3a8a5f59067fd6476205a9de3ec7d69267f 100644 (file)
@@ -42,7 +42,8 @@ def make_app(global_conf, full_stack=True, **app_conf):
     app = PylonsApp()
     
     # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)
-    app = authkit.authorize.middleware(app, BlueChipUser())
+    if not app_conf.get('noauth', False):
+        app = authkit.authorize.middleware(app, BlueChipUser())
     
     # Routing/Session/Cache Middleware
     app = RoutesMiddleware(app, config['routes.map'])