[MERGE] Forward-port 7.0 up to rev. 20f69bbce9
This commit is contained in:
commit
10e6ad1355
|
@ -30,6 +30,7 @@ from openerp import tools
|
|||
import openerp.exceptions
|
||||
from openerp.osv import fields,osv, expression
|
||||
from openerp.osv.orm import browse_record
|
||||
from openerp.service.security import check_super
|
||||
from openerp.tools.translate import _
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
@ -422,10 +423,7 @@ class res_users(osv.osv):
|
|||
return dataobj.browse(cr, uid, data_id, context=context).res_id
|
||||
|
||||
def check_super(self, passwd):
|
||||
if passwd == tools.config['admin_passwd']:
|
||||
return True
|
||||
else:
|
||||
raise openerp.exceptions.AccessDenied()
|
||||
return check_super(passwd)
|
||||
|
||||
def check_credentials(self, cr, uid, password):
|
||||
""" Override this method to plug additional authentication methods"""
|
||||
|
|
|
@ -26,9 +26,8 @@ def login(db, login, password):
|
|||
return res_users.login(db, login, password)
|
||||
|
||||
def check_super(passwd):
|
||||
if passwd == openerp.tools.config['admin_passwd']:
|
||||
if passwd and passwd == openerp.tools.config['admin_passwd']:
|
||||
return True
|
||||
else:
|
||||
raise openerp.exceptions.AccessDenied()
|
||||
|
||||
def check(db, uid, passwd):
|
||||
|
|
Loading…
Reference in New Issue