bypass demo@erpnext.com from session deletion
This commit is contained in:
parent
9c968f339b
commit
8bbc5a2b11
@ -21,7 +21,7 @@ from webnotes.utils import load_json, cint, nowdate
|
|||||||
|
|
||||||
|
|
||||||
def check_demo():
|
def check_demo():
|
||||||
demo_user = 'demo@webnotestech.com'
|
demo_user = 'demo@erpnext.com'
|
||||||
if webnotes.session['user']==demo_user:
|
if webnotes.session['user']==demo_user:
|
||||||
webnotes.msgprint("Can't change in demo", raise_exception=1)
|
webnotes.msgprint("Can't change in demo", raise_exception=1)
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ def on_login_post_session(login_manager):
|
|||||||
update login_from and delete parallel sessions
|
update login_from and delete parallel sessions
|
||||||
"""
|
"""
|
||||||
# Clear previous sessions i.e. logout previous log-in attempts
|
# 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:
|
if webnotes.session['user'] not in exception_list:
|
||||||
sid_list = webnotes.conn.sql("""
|
sid_list = webnotes.conn.sql("""
|
||||||
DELETE FROM `tabSessions`
|
DELETE FROM `tabSessions`
|
||||||
@ -38,7 +38,7 @@ def on_login_post_session(login_manager):
|
|||||||
# check if account is expired
|
# check if account is expired
|
||||||
check_if_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
|
# create feed
|
||||||
from webnotes.utils import nowtime
|
from webnotes.utils import nowtime
|
||||||
from webnotes.profile import get_user_fullname
|
from webnotes.profile import get_user_fullname
|
||||||
|
Loading…
x
Reference in New Issue
Block a user