From 3574998f5f7c41e946610730638fd7e3fecb5835 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 24 Feb 2014 18:34:17 -0500 Subject: Use cherrypy handlers to render error pages Replaces custom code to render 401 Unauthorized page as well as adds 400 and 500 handlers Signed-off-by: Simo Sorce --- ipsilon/login/common.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ipsilon/login/common.py') diff --git a/ipsilon/login/common.py b/ipsilon/login/common.py index 5879fda..4ffdd8a 100755 --- a/ipsilon/login/common.py +++ b/ipsilon/login/common.py @@ -56,9 +56,8 @@ class LoginManagerBase(PluginObject): # otherwise destroy session and return error if not ref: - ref = cherrypy.config.get('base.mount', "") + '/unauthorized' - # Just make sure we destroy the session session.logout(None) + raise cherrypy.HTTPError(401) raise cherrypy.HTTPRedirect(ref) -- cgit