Changeset 5598
- Timestamp:
- 10/24/08 12:44:42 (3 months ago)
- Files:
-
- trunk/tg/commands/info.py (modified) (1 diff)
- trunk/tg/configuration.py (modified) (3 diffs)
- trunk/tg/controllers.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tg/commands/info.py
r4559 r5598 13 13 """#elements that not clear yet 14 14 "TurboGears2 Extensions" : "turbogears2.extensions", 15 " Identity Providers" : "turbogears2.identity.provider",15 "Auth Providers" : "turbogears2.auth.provider", 16 16 "Visit Managers" : "turbogears2.visit.manager", 17 17 """ trunk/tg/configuration.py
r5526 r5598 97 97 """Creates some configuration defaults""" 98 98 99 # Create a few bunches we know we'll use99 # Create a few bunches we know we'll use 100 100 self.paths = Bunch() 101 101 self.render_functions = Bunch() 102 # And also very often... 103 self.sa_auth = Bunch() 104 self.sa_auth.translations = Bunch() 102 105 103 106 #Set individual defaults … … 155 158 156 159 def setup_sa_auth_backend(self): 157 defaults = {'users_table':'tg_user', 158 'groups_table':'tg_group', 159 'permissions_table':'tg_permission', 160 'password_encryption_method':'sha1', 160 defaults = { 161 161 'form_plugin': None 162 162 } … … 287 287 def add_auth_middleware(self, app): 288 288 """Configure authorization/authentication""" 289 from tg .ext.repoze.who.middleware import make_who_middleware289 from tgext.authorization.quickstart import setup_sql_auth 290 290 291 291 auth = self.sa_auth 292 292 293 app = make_who_middleware(app, config, auth.user_class, 294 auth.user_criterion, 295 auth.user_id_column, 296 auth.dbsession, 297 ) 293 app = setup_sql_auth(app, config, auth.user_class, auth.group_class, 294 auth.permission_class, auth.dbsession, 295 translations=auth.translations) 298 296 return app 299 297 trunk/tg/controllers.py
r5519 r5598 408 408 return obj, remainder 409 409 410 # identityerror should be treated separatly from "not found" errors410 # auth error should be treated separatly from "not found" errors 411 411 except HTTPUnauthorized, httpe: 412 412 log.debug("a 401 error occured for obj: %s" % obj)