[minor] update password
This commit is contained in:
parent
c875300fe2
commit
8db093b4c6
@ -40,6 +40,7 @@ def make(reset=False, simulate=True):
|
|||||||
if reset:
|
if reset:
|
||||||
setup()
|
setup()
|
||||||
else:
|
else:
|
||||||
|
webnotes.conn.close()
|
||||||
webnotes.connect(db_name=webnotes.conf.demo_db_name)
|
webnotes.connect(db_name=webnotes.conf.demo_db_name)
|
||||||
|
|
||||||
if simulate:
|
if simulate:
|
||||||
|
@ -8,7 +8,6 @@ import utilities.demo.make_demo
|
|||||||
def make_demo_app(site=None):
|
def make_demo_app(site=None):
|
||||||
webnotes.mute_emails = 1
|
webnotes.mute_emails = 1
|
||||||
webnotes.init(site=site)
|
webnotes.init(site=site)
|
||||||
webnotes.connect(db_name=webnotes.conf.demo_db_name, site=site)
|
|
||||||
|
|
||||||
utilities.demo.make_demo.make(reset=True, simulate=False)
|
utilities.demo.make_demo.make(reset=True, simulate=False)
|
||||||
# setup demo user etc so that the site it up faster, while the data loads
|
# setup demo user etc so that the site it up faster, while the data loads
|
||||||
@ -18,6 +17,8 @@ def make_demo_app(site=None):
|
|||||||
utilities.demo.make_demo.make(reset=False, simulate=True)
|
utilities.demo.make_demo.make(reset=False, simulate=True)
|
||||||
|
|
||||||
def make_demo_user():
|
def make_demo_user():
|
||||||
|
from webnotes.auth import _update_password
|
||||||
|
|
||||||
roles = ["Accounts Manager", "Analytics", "Expense Approver", "Accounts User",
|
roles = ["Accounts Manager", "Analytics", "Expense Approver", "Accounts User",
|
||||||
"Leave Approver", "Blogger", "Customer", "Sales Manager", "Employee", "Support Manager",
|
"Leave Approver", "Blogger", "Customer", "Sales Manager", "Employee", "Support Manager",
|
||||||
"HR Manager", "HR User", "Maintenance Manager", "Maintenance User", "Material Manager",
|
"HR Manager", "HR User", "Maintenance Manager", "Maintenance User", "Material Manager",
|
||||||
@ -44,10 +45,10 @@ def make_demo_user():
|
|||||||
p.doc.last_name = "User"
|
p.doc.last_name = "User"
|
||||||
p.doc.enabled = 1
|
p.doc.enabled = 1
|
||||||
p.doc.user_type = "ERPNext Demo"
|
p.doc.user_type = "ERPNext Demo"
|
||||||
p.doc.new_password = "demo"
|
|
||||||
p.insert()
|
p.insert()
|
||||||
add_roles(p)
|
add_roles(p)
|
||||||
p.save()
|
p.save()
|
||||||
|
_update_password("demo@erpnext.com", "demo")
|
||||||
|
|
||||||
# make system manager user
|
# make system manager user
|
||||||
if webnotes.conn.exists("Profile", "admin@erpnext.com"):
|
if webnotes.conn.exists("Profile", "admin@erpnext.com"):
|
||||||
@ -59,11 +60,11 @@ def make_demo_user():
|
|||||||
p.doc.last_name = "User"
|
p.doc.last_name = "User"
|
||||||
p.doc.enabled = 1
|
p.doc.enabled = 1
|
||||||
p.doc.user_type = "System User"
|
p.doc.user_type = "System User"
|
||||||
p.doc.new_password = "admin010123"
|
|
||||||
p.insert()
|
p.insert()
|
||||||
roles.append("System Manager")
|
roles.append("System Manager")
|
||||||
add_roles(p)
|
add_roles(p)
|
||||||
p.save()
|
p.save()
|
||||||
|
_update_password("admin@erpnext.com", "admin010123")
|
||||||
|
|
||||||
# only read for newsletter
|
# only read for newsletter
|
||||||
webnotes.conn.sql("""update `tabDocPerm` set `write`=0, `create`=0, `cancel`=0
|
webnotes.conn.sql("""update `tabDocPerm` set `write`=0, `create`=0, `cancel`=0
|
||||||
|
Loading…
Reference in New Issue
Block a user