17 lines
897 B
Diff
17 lines
897 B
Diff
diff -rupN auth_oauth_multi_token/models/res_users.py auth_oauth_multi_token.patch/models/res_users.py
|
|
--- auth_oauth_multi_token/models/res_users.py 2021-05-31 18:39:08.015127916 -0500
|
|
+++ auth_oauth_multi_token.patch/models/res_users.py 2021-05-31 20:37:17.138888645 -0500
|
|
@@ -66,10 +66,10 @@ class ResUsers(models.Model):
|
|
res.oauth_master_uuid = self._generate_oauth_master_uuid()
|
|
|
|
@api.model
|
|
- def _check_credentials(self, password):
|
|
+ def _check_credentials(self, password, env):
|
|
"""Override to check credentials against multi tokens."""
|
|
try:
|
|
- return super()._check_credentials(password)
|
|
+ return super()._check_credentials(password, env)
|
|
except exceptions.AccessDenied:
|
|
res = self.multi_token_model.sudo().search(
|
|
[("user_id", "=", self.env.uid), ("oauth_access_token", "=", password)]
|