fixes in install: store password in __Auth
This commit is contained in:
parent
2709c7dafe
commit
0116eaea56
3 changed files with 6 additions and 7 deletions
|
|
@ -668,7 +668,7 @@ _f.Frm.prototype.refresh_fields = function() {
|
|||
f.df = wn.meta.get_docfield(this.doctype, fn, this.docname);
|
||||
|
||||
if(f.df.fieldtype!='Section Break' && f.refresh) {
|
||||
f.refresh();
|
||||
f.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@ class Installer:
|
|||
|
||||
# set the basic passwords
|
||||
webnotes.conn.begin()
|
||||
webnotes.conn.sql("""update tabProfile set password = password('admin')
|
||||
where name='Administrator'""")
|
||||
webnotes.conn.sql("""update __Auth set password = password('admin')
|
||||
where user='Administrator'""")
|
||||
webnotes.conn.commit()
|
||||
|
||||
def create_sessions_table(self):
|
||||
|
|
@ -145,7 +145,7 @@ class Installer:
|
|||
def create_cache_item(self):
|
||||
import webnotes
|
||||
self.dbman.drop_table('__CacheItem')
|
||||
webnotes.conn.sql("""create table __CacheItem(
|
||||
webnotes.conn.sql("""create table __CacheItem (
|
||||
`key` VARCHAR(180) NOT NULL PRIMARY KEY,
|
||||
`value` LONGTEXT,
|
||||
`expires_on` DATETIME
|
||||
|
|
@ -153,8 +153,7 @@ class Installer:
|
|||
|
||||
def create_auth_table(self):
|
||||
import webnotes
|
||||
self.dbman.drop_table('__Auth')
|
||||
webnotes.conn.sql("""create table __Auth(
|
||||
webnotes.conn.sql("""create table if not exists __Auth (
|
||||
`user` VARCHAR(180) NOT NULL PRIMARY KEY,
|
||||
`password` VARCHAR(180) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8""")
|
||||
|
|
@ -346,7 +346,7 @@ class DbManager:
|
|||
|
||||
def grant_all_privileges(self,target,user):
|
||||
try:
|
||||
self.conn.sql("GRANT ALL PRIVILEGES ON `%s` . * TO '%s'@'localhost';" % (target, user))
|
||||
self.conn.sql("GRANT ALL PRIVILEGES ON `%s`.* TO '%s'@'localhost';" % (target, user))
|
||||
except Exception,e:
|
||||
raise e
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue