Add toshio's fix for the incorrect http redirects.
This commit is contained in:
parent
e3ee49d9e2
commit
1847311f02
2 changed files with 4 additions and 2 deletions
|
@ -54,7 +54,7 @@ tg.strict_parameters = True
|
||||||
|
|
||||||
server.webpath='/fas'
|
server.webpath='/fas'
|
||||||
base_url_filter.on=True
|
base_url_filter.on=True
|
||||||
base_url = "https://publictest1.fedoraproject.org"
|
base_url_filter.base_url = "https://publictest1.fedoraproject.org/fas"
|
||||||
|
|
||||||
# Make the session cookie only return to the host over an SSL link
|
# Make the session cookie only return to the host over an SSL link
|
||||||
# Disabled for testing.
|
# Disabled for testing.
|
||||||
|
|
|
@ -60,6 +60,8 @@ class Root(controllers.RootController):
|
||||||
and identity.was_login_attempted() \
|
and identity.was_login_attempted() \
|
||||||
and not identity.get_identity_errors():
|
and not identity.get_identity_errors():
|
||||||
turbogears.flash(_('Welcome, %s') % Person.byUserName(turbogears.identity.current.user_name).givenName)
|
turbogears.flash(_('Welcome, %s') % Person.byUserName(turbogears.identity.current.user_name).givenName)
|
||||||
|
if not forward_url:
|
||||||
|
forward_url = config.get('base_url_filter.base_url') + '/'
|
||||||
raise redirect(forward_url)
|
raise redirect(forward_url)
|
||||||
|
|
||||||
forward_url=None
|
forward_url=None
|
||||||
|
@ -84,4 +86,4 @@ class Root(controllers.RootController):
|
||||||
def logout(self):
|
def logout(self):
|
||||||
identity.current.logout()
|
identity.current.logout()
|
||||||
turbogears.flash(_('You have successfully logged out.'))
|
turbogears.flash(_('You have successfully logged out.'))
|
||||||
raise redirect("/")
|
raise redirect(request.headers.get("Referer", "/"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue