From: Michael Tremer Date: Wed, 14 Nov 2012 12:48:29 +0000 (+0100) Subject: Remove login successful and logout successful messages. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa5fa7db9d31b74e94be1ed88b9fe57a61c32b9b;p=pbs.git Remove login successful and logout successful messages. --- diff --git a/data/templates/login-successful.html b/data/templates/login-successful.html deleted file mode 100644 index d7e74628..00000000 --- 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 b7bb91aa..00000000 --- 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 b3b06d8a..541311bd 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("/")