[FIX] users_ldap: consistent handling of login() vs check()
Explicit check for blank passwords was introduced recently in check() for bug 760301, but login() did not behave the same so the resulting error message would be inconsistent. lp bug: https://launchpad.net/bugs/760301 fixed bzr revid: odo@openerp.com-20110616160219-m0y066q914s4y7ev
This commit is contained in:
parent
d6e1bc3046
commit
20c49ad274
|
@ -70,6 +70,11 @@ res_company()
|
|||
class users(osv.osv):
|
||||
_inherit = "res.users"
|
||||
def login(self, db, login, password):
|
||||
|
||||
if not password:
|
||||
# empty passwords are disallowed for obvious security reasons
|
||||
return False
|
||||
|
||||
ret = super(users,self).login(db, login, password)
|
||||
if ret:
|
||||
return ret
|
||||
|
|
Loading…
Reference in New Issue