diff options
| author | Xavier Morel <xmo@odoo.com> | 2019-05-13 12:31:37 +0000 |
|---|---|---|
| committer | Olivier Dony <odo@odoo.com> | 2020-08-14 21:20:47 +0000 |
| commit | 950d962d95d214bdd1bdd64d8771af96d4d618cf (patch) | |
| tree | ad71faa07eed5dd29bd9abfb41e552a20da3c363 /addons/auth_oauth | |
| parent | d21420d87ad8a269a0f30b3d9c0a3cee8c46cb14 (diff) | |
[IMP] core: add env to various auth methods
Allows accessing various keys, especially whether this is an
interactive login or not.
Also have the xml-rpc `login` delegate to `authenticate` instead of
having its own half-assed implementation.
And remove some dead code: as far as I can tell, Session.authenticate
is never called with a uid.
Diffstat (limited to 'addons/auth_oauth')
| -rw-r--r-- | addons/auth_oauth/models/res_users.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/auth_oauth/models/res_users.py b/addons/auth_oauth/models/res_users.py index 0e54a23b0aa..2ee46b6b38c 100644 --- a/addons/auth_oauth/models/res_users.py +++ b/addons/auth_oauth/models/res_users.py @@ -109,9 +109,9 @@ class ResUsers(models.Model): # return user credentials return (self.env.cr.dbname, login, access_token) - def _check_credentials(self, password): + def _check_credentials(self, password, env): try: - return super(ResUsers, self)._check_credentials(password) + return super(ResUsers, self)._check_credentials(password, env) except AccessDenied: res = self.sudo().search([('id', '=', self.env.uid), ('oauth_access_token', '=', password)]) if not res: |
