Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.
| File tg-trunk.patch,
1.9 KB
(added by Gustavo, 4 years ago) |
|
The updated patch for tg.config
|
-
|
|
|
|
| 91 | 96 | config['pylons.h'] = self.package.lib.helpers |
| 92 | 97 | |
| 93 | 98 | def setup_sa_auth_backend(self): |
| 94 | | defaults = {'user_class':self.model.User, |
| 95 | | 'group_class':self.model.Group, |
| 96 | | 'permission_class':self.model.Permission, |
| 97 | | 'users_table':'tg_user', |
| 98 | | 'groups_table':'tg_group', |
| 99 | | 'permissions_table':'tg_permission', |
| 100 | | 'password_encryption_method':'sha1', |
| 101 | | 'form_plugin': None |
| 102 | | } |
| 103 | | if config.get('sa_auth'): |
| 104 | | config['sa_auth'] = defaults.update(config['sa_auth']) |
| 105 | | if not config['sa_auth']: |
| 106 | | config['sa_auth'] = defaults |
| | 99 | defaults = {'users_table':'tg_user', |
| | 100 | 'groups_table':'tg_group', |
| | 101 | 'permissions_table':'tg_permission', |
| | 102 | 'password_encryption_method':'sha1', |
| | 103 | 'form_plugin': None |
| | 104 | } |
| | 105 | # The developer must have defined a 'sa_auth' section, because |
| | 106 | # values such as the User, Group or Permission classes must be |
| | 107 | # explicitly defined. |
| | 108 | config['sa_auth'] = defaults.update(config['sa_auth']) |
| 107 | 109 | |
| 108 | 110 | def setup_mako_renderer(self): |
| 109 | 111 | # Create the Mako TemplateLookup, with the default auto-escaping |
| … |
… |
|
| 214 | 216 | |
| 215 | 217 | auth = self.sa_auth |
| 216 | 218 | |
| 217 | | app = make_who_middleware(app, config, auth.user, |
| | 219 | app = make_who_middleware(app, config, auth.user_class, |
| 218 | 220 | auth.user_criterion, |
| 219 | 221 | auth.user_id_column, |
| 220 | 222 | auth.dbsession, |
Download in other formats: