Add toshio's fix for the incorrect http redirects.

This commit is contained in:
Ricky Zhou (周家杰) 2007-12-19 14:06:00 -07:00
parent e3ee49d9e2
commit 1847311f02
2 changed files with 4 additions and 2 deletions

View file

@ -54,7 +54,7 @@ tg.strict_parameters = True
server.webpath='/fas'
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
# Disabled for testing.

View file

@ -60,6 +60,8 @@ class Root(controllers.RootController):
and identity.was_login_attempted() \
and not identity.get_identity_errors():
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)
forward_url=None
@ -84,4 +86,4 @@ class Root(controllers.RootController):
def logout(self):
identity.current.logout()
turbogears.flash(_('You have successfully logged out.'))
raise redirect("/")
raise redirect(request.headers.get("Referer", "/"))