]> asedeno.scripts.mit.edu Git - bluechips.git/commitdiff
Introduce a new "noauth" config option and deprecate fake_username.
authorEvan Broder <broder@mit.edu>
Thu, 1 Jul 2010 01:43:50 +0000 (21:43 -0400)
committerEvan Broder <broder@mit.edu>
Thu, 1 Jul 2010 01:43:50 +0000 (21:43 -0400)
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'])