bypass demo@erpnext.com from session deletion

This commit is contained in:
Nabin Hait 2012-11-05 18:58:15 +05:30
parent 9c968f339b
commit 8bbc5a2b11
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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