[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:
Olivier Dony
2011-06-16 18:03:17 +02:00
parent b8ad81295a
commit bf72e97065
+5
View File
@@ -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