(cls, db, uid, passwd)
Verifies that the given (uid, password) is authorized for the database ``db`` and
           raise an exception if it is not.
Verifies that the given (uid, password) is authorized for the database ``db`` and
           raise an exception if it is not.
Verifies that the given ( uid password ) is authorized for the database db and raise an exception if it is not .
def check(cls, db, uid, passwd):
        """Verifies that the given (uid, password) is authorized for the database ``db`` and
           raise an exception if it is not."""
        if not passwd:
            # empty passwords disallowed for obvious security reasons
            raise AccessDenied()

        with contextlib.closing(cls.pool.cursor()) as cr:
            self = api.Environment(cr, uid, {})[cls._name]
            with self._assert_can_auth():
                if not self.env.user.active:
                    raise AccessDenied()
                self._check_credentials(passwd, {'interactive': False})
def check ( cls , db , uid , passwd ) : if not passwd : # empty passwords disallowed for obvious security reasons raise AccessDenied ( ) with contextlib . closing ( cls . pool . cursor ( ) ) as cr : self = api . Environment ( cr , uid , { } ) [ cls . _name ] with self . _assert_can_auth ( ) : if not self . env . user . active : raise AccessDenied ( ) self . _check_credentials ( passwd , { 'interactive' : False } )