Skip to content

Commit

Permalink
[FIX] Removed check_super duplicate from res_users.py
Browse files Browse the repository at this point in the history
  • Loading branch information
PCatinean committed Sep 7, 2015
1 parent 4428226 commit a1345ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions openerp/addons/base/res/res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from openerp.osv import fields, osv, expression
from openerp.tools.translate import _
from openerp.http import request
from openerp.service.security import check_super

_logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -407,10 +408,7 @@ def action_get(self, cr, uid, context=None):
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()
check_super(passwd)

def check_credentials(self, cr, uid, password):
""" Override this method to plug additional authentication methods"""
Expand Down
2 changes: 1 addition & 1 deletion openerp/service/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ 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()
Expand Down

0 comments on commit a1345ab

Please sign in to comment.