equal
deleted
inserted
replaced
81 class LogoutController(Controller): |
81 class LogoutController(Controller): |
82 __regid__ = 'logout' |
82 __regid__ = 'logout' |
83 |
83 |
84 def publish(self, rset=None): |
84 def publish(self, rset=None): |
85 """logout from the instance""" |
85 """logout from the instance""" |
86 return self.appli.session_handler.logout(self._cw) |
86 return self.appli.session_handler.logout(self._cw, self.goto_url()) |
87 |
87 |
|
88 def goto_url(self): |
|
89 # * in http auth mode, url will be ignored |
|
90 # * in cookie mode redirecting to the index view is enough : either |
|
91 # anonymous connection is allowed and the page will be displayed or |
|
92 # we'll be redirected to the login form |
|
93 msg = self._cw._('you have been logged out') |
|
94 if self._cw.https: |
|
95 # XXX hack to generate an url on the http version of the site |
|
96 self._cw._base_url = self._cw.vreg.config['base-url'] |
|
97 self._cw.https = False |
|
98 return self._cw.build_url('view', vid='index', __message=msg) |
88 |
99 |
89 class ViewController(Controller): |
100 class ViewController(Controller): |
90 """standard entry point : |
101 """standard entry point : |
91 - build result set |
102 - build result set |
92 - select and call main template |
103 - select and call main template |