From 8bbc5a2b115340df6a65a042b298f42da3f4d012 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 5 Nov 2012 18:58:15 +0530 Subject: [PATCH] bypass demo@erpnext.com from session deletion --- home/page/profile_settings/profile_settings.py | 2 +- startup/event_handlers.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/home/page/profile_settings/profile_settings.py b/home/page/profile_settings/profile_settings.py index 4aed1cea55..8893ff6a62 100644 --- a/home/page/profile_settings/profile_settings.py +++ b/home/page/profile_settings/profile_settings.py @@ -21,7 +21,7 @@ from webnotes.utils import load_json, cint, nowdate def check_demo(): - demo_user = 'demo@webnotestech.com' + demo_user = 'demo@erpnext.com' if webnotes.session['user']==demo_user: webnotes.msgprint("Can't change in demo", raise_exception=1) diff --git a/startup/event_handlers.py b/startup/event_handlers.py index 573bcc6b62..4c4e55bb4c 100644 --- a/startup/event_handlers.py +++ b/startup/event_handlers.py @@ -26,7 +26,7 @@ def on_login_post_session(login_manager): update login_from and delete parallel sessions """ # Clear previous sessions i.e. logout previous log-in attempts - exception_list = ['demo@webnotestech.com', 'Administrator', 'Guest'] + exception_list = ['demo@erpnext.com', 'Administrator', 'Guest'] if webnotes.session['user'] not in exception_list: sid_list = webnotes.conn.sql(""" DELETE FROM `tabSessions` @@ -38,7 +38,7 @@ def on_login_post_session(login_manager): # check if account is expired check_if_expired() - if webnotes.session['user'] not in ('Guest', 'demo@webnotestech.com'): + if webnotes.session['user'] not in ('Guest', 'demo@erpnext.com'): # create feed from webnotes.utils import nowtime from webnotes.profile import get_user_fullname