Saturday, June 25, 2022
2 changes · master
Miscellaneous changes
Backport of odoo/odoo#81474 Before odoo/odoo#86889 a regular user with employees in multiple companies was not able to change his own language due to a chain of event calling onchange on all the employee_ids and employee_ids on res.users being read as sudo. The fix does work but was wrong because it gave access to the user's public employee regardless of the active company_id A domain was added to employee_ids to make force the security rules even in sudo. Forward-Port-Of: odoo/odoo#945
Original PR description
Backport of odoo/odoo#81474 Before odoo/odoo#86889 a regular user with employees in multiple companies was not able to change his own language due to a chain of event calling onchange on all the employee_ids and employee_ids on res.users being read as sudo. The fix does work but was wrong because it gave access to the user's public employee regardless of the active company_id A domain was added to employee_ids to make force the security rules even in sudo. Forward-Port-Of: odoo/odoo#94558
This commit checks that users without the access right 'Template Editor' are not allowed to add dynamic qweb in the translations of a mail template. Old tests have been updated to keep the assertRaises and all the code that handle the invalidation cache, ... But now we ensure that the Access Error raised is the expected one. Original tests was testing that a user without the group 'Mail Editor' got an access error due to the missing group, but since the commit https://github.com/odo
Original PR description
This commit checks that users without the access right 'Template Editor' are not allowed to add dynamic qweb in the translations of a mail template. Old tests have been updated to keep the assertRaises and all the code that handle the invalidation cache, ... But now we ensure that the Access Error raised is the expected one. Original tests was testing that a user without the group 'Mail Editor' got an access error due to the missing group, but since the commit https://github.com/odoo/odoo/commit/1a3e713c99474951cb5000c55a2382ba12074273 the Access Error is because you cannot edit a template that is not created by yourself. Forward-Port-Of: odoo/odoo#93713