summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorVictor Feyens <vfe@odoo.com>2019-10-11 16:14:19 +0000
committerVictor Feyens <vfe@odoo.com>2019-10-24 17:12:16 +0000
commitf76c5a8bbd9a4f639c59b7f602b165c8d38ff360 (patch)
tree4dfe9c504dd3d4233c303fb53424c74e875edac0 /addons/web/static/src/js/fields/basic_fields.js
parentebac65bebf709481561a18a02ed77eba80e73ede (diff)
[IMP] ORM: do not allow invalid allowed_company_ids context key.
Since https://github.com/odoo/odoo/commit/a5b6f31cf28e5381e1c85f66730bcdb55998e643, the current companies of the user are saved in the context as "allowed_company_ids" context key. In case of invalid context content, the api was computing the intersection between the context content and the user company(ies) and falling back on user company_id(s) when catching an error. A sanity check was done, but no feedback was given to the user, saying that the context change was falsy. This commits changes this behavior to : * raise an AccessError when trying to access self.env.company(ies) when invalid or unauthorized companies are defined in the context. * take sudo mode into consideration, allowing inter-company impacts, even when current user doesn't have access to a given company, if the code is done in a sudoed environment. Co-Authored-By: Raphael Collet <rco@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions