Skip to content
Snippets Groups Projects
Commit 119637cf authored by Paul Morelle's avatar Paul Morelle
Browse files

[FIX] models: fix permission check in export_data


The permission check in BaseModel:export_data was checking if the
current user was the administrator user, instead of checking if the
environment was administrator (i.e. it should also check if the sudo bit
is set on the environment).

This commit fixes this and allows to export_data with a simple `sudo()`
instead of needing a `with_user(SUPERUSER_ID)`.

closes odoo/odoo#54647

X-original-commit: f69f47b6ba5c6c462bf617f4876a39233f60034f
Signed-off-by: default avatarOlivier Dony (odo) <odo@openerp.com>
Signed-off-by: default avatarPaul Morelle <madprog@users.noreply.github.com>
parent 2a19a837
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment