Fix mobile logout behavior
This commit is contained in:
parent
024f09dbd4
commit
9beb32cea2
|
@ -96,7 +96,7 @@
|
||||||
% elif request.is_admin:
|
% elif request.is_admin:
|
||||||
<li class="root-user" data-icon="forbidden">${h.link_to("Become root", url('become_root'), **{'data-ajax': 'false'})}</li>
|
<li class="root-user" data-icon="forbidden">${h.link_to("Become root", url('become_root'), **{'data-ajax': 'false'})}</li>
|
||||||
% endif
|
% endif
|
||||||
<li data-icon="lock">${h.link_to("Logout", url('logout'), **{'data-ajax': 'false'})}</li>
|
<li data-icon="lock">${h.link_to("Logout", url('mobile.logout'), **{'data-ajax': 'false'})}</li>
|
||||||
<li data-icon="info">${h.link_to("About {}".format(capture(self.app_title)), url('mobile.about'))}</li>
|
<li data-icon="info">${h.link_to("About {}".format(capture(self.app_title)), url('mobile.about'))}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -143,7 +143,8 @@ class AuthenticationView(View):
|
||||||
"""
|
"""
|
||||||
headers = logout_user(self.request)
|
headers = logout_user(self.request)
|
||||||
if self.rattail_config.getbool('tailbone', 'home_after_logout', default=False):
|
if self.rattail_config.getbool('tailbone', 'home_after_logout', default=False):
|
||||||
return self.redirect(self.request.route_url('home'), headers=headers)
|
home = 'mobile.home' if mobile else 'home'
|
||||||
|
return self.redirect(self.request.route_url(home), headers=headers)
|
||||||
login = 'mobile.login' if mobile else 'login'
|
login = 'mobile.login' if mobile else 'login'
|
||||||
referrer = self.request.get_referrer(default=self.request.route_url(login))
|
referrer = self.request.get_referrer(default=self.request.route_url(login))
|
||||||
return self.redirect(referrer, headers=headers)
|
return self.redirect(referrer, headers=headers)
|
||||||
|
|
Loading…
Reference in a new issue