From 84e8aa90dd030f9848ae29254e270af700bf528f Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Wed, 5 Jul 2023 12:50:15 +0200 Subject: [PATCH] [IMP] hr: Prevent non HR people from accessing employees bank accounts - Billing officers / HR officers have access to all bank accounts - Internal users only have access to bank accounts that are not linked to an employee - Portal/Public users have access to nothing. TaskID: 3101400 --- addons/account/security/account_security.xml | 12 ++++++++++++ addons/hr/security/hr_security.xml | 14 ++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml index 0ea90c4dbe6..8e08ed1693e 100644 --- a/addons/account/security/account_security.xml +++ b/addons/account/security/account_security.xml @@ -299,5 +299,17 @@ [('company_id', 'in', company_ids)] + + + + Billing: Allow accessing employee bank accounts + + [(1, '=', 1)] + + diff --git a/addons/hr/security/hr_security.xml b/addons/hr/security/hr_security.xml index 717928e00db..f9fccadd833 100644 --- a/addons/hr/security/hr_security.xml +++ b/addons/hr/security/hr_security.xml @@ -72,5 +72,19 @@ ['|', ('user_id', '=', user.id), ('activity_ids.user_id', '=', user.id)] + + + HR: Prevent non HR officers from accessing employee bank accounts + + [('partner_id.employee_ids', '=', False)] + + + + + HR: Allow HR officers from accessing employee bank accounts + + [(1, '=', 1)] + +