[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-20110616160317-4hfw5e360e600pgq
This commit is contained in:
@@ -66,6 +66,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
|
||||
|
||||
Reference in New Issue
Block a user