From fa5fa7db9d31b74e94be1ed88b9fe57a61c32b9b Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 14 Nov 2012 13:48:29 +0100 Subject: [PATCH] Remove login successful and logout successful messages. --- data/templates/login-successful.html | 33 ---------------------------- data/templates/logout.html | 30 ------------------------- web/handlers_auth.py | 16 +++++--------- 3 files changed, 5 insertions(+), 74 deletions(-) delete mode 100644 data/templates/login-successful.html delete mode 100644 data/templates/logout.html diff --git a/data/templates/login-successful.html b/data/templates/login-successful.html deleted file mode 100644 index d7e7462..0000000 --- a/data/templates/login-successful.html +++ /dev/null @@ -1,33 +0,0 @@ -{% extends "base.html" %} - -{% block title %}{{ _("Login successful") }}{% end block %} - -{% block body %} - - - - -
-
-

- {{ _("Welcome, %s.") % user.realname }} -

- -

- {{ _("Your login to the Pakfire Build Service was successful.") }} -

- - {{ _("Start!") }} -
-
-{% end %} diff --git a/data/templates/logout.html b/data/templates/logout.html deleted file mode 100644 index b7bb91a..0000000 --- a/data/templates/logout.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends "base.html" %} - -{% block title %}{{ _("Logout successful") }}{% end block %} - -{% block body %} - - - - -
-
-

- {{ _("You have successfully logged out from the Pakfire Build Server.") }} - {{ _("Have a nice day!") }} -

- - {{ _("Goodbye!") }} -
-
-{% end %} diff --git a/web/handlers_auth.py b/web/handlers_auth.py index b3b06d8..541311b 100644 --- a/web/handlers_auth.py +++ b/web/handlers_auth.py @@ -32,14 +32,9 @@ class LoginHandler(BaseHandler): self._current_user = user # If there is "next" given, we redirect the user accordingly. - # Otherwise we show a nice welcome message and tell the user, that - # the login was successful. - next = self.get_argument("next", None) - - if next: - self.redirect(next) - else: - self.render("login-successful.html", user=user) + # Otherwise we redirect to the front page. + next = self.get_argument("next", "/") + self.redirect(next) else: # If the login failed we return an error message. @@ -153,7 +148,6 @@ class LogoutHandler(BaseHandler): # Destroy the user's session. self.session.destroy() - self._current_user = None - # Show a message to the user. - self.render("logout.html") + # Redirect the user to the front page. + self.redirect("/") -- 2.47.3