allura
リビジョン | 97a17d6e4b639861e36668e548ca70712876f5df (tree) |
---|---|
日時 | 2010-06-03 03:52:43 |
作者 | Wolf <wolf@geek...> |
コミッター | Wolf |
[#483] logout must include sfx logout
@@ -171,7 +171,10 @@ class AuthController(object): | ||
171 | 171 | @expose() |
172 | 172 | def logout(self): |
173 | 173 | plugin.AuthenticationProvider.get(request).logout() |
174 | - redirect('/') | |
174 | + if config.get('auth.method', 'local') == 'sfx': | |
175 | + redirect(g.logout_url) | |
176 | + else: | |
177 | + redirect('/') | |
175 | 178 | |
176 | 179 | @expose() |
177 | 180 | def do_login(self, came_from=None, **kw): |
@@ -53,8 +53,9 @@ class Globals(object): | ||
53 | 53 | self.solr = None |
54 | 54 | self.use_queue = asbool(config.get('use_queue', False)) |
55 | 55 | |
56 | - # Load login url | |
57 | - self.login_url = config.get('auth.login_url') # only used for SFX logins | |
56 | + # Load login/logout urls; only used for SFX logins | |
57 | + self.login_url = config.get('auth.login_url') | |
58 | + self.logout_url = config.get('auth.logout_url') | |
58 | 59 | |
59 | 60 | # Setup RabbitMQ |
60 | 61 | if asbool(config.get('amqp.mock')): |
@@ -31,6 +31,7 @@ beaker.session.validate_key = 714bfe3612c42390726f | ||
31 | 31 | |
32 | 32 | auth.method = sfx |
33 | 33 | auth.login_url = /account/login.php |
34 | +auth.logout_url = /account/logout.php | |
34 | 35 | auth.sys_session_db_database= |
35 | 36 | auth.sys_session_db_host= |
36 | 37 | auth.sys_session_db_username= |