From bb3320f103f8bfc96e3b8d89a188e64e9b5dd3a3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Jun 2020 18:34:19 +0200 Subject: [PATCH] FIX #14104 --- htdocs/comm/action/class/api_agendaevents.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index a8cb6b5de8f..e09bc905b96 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -248,7 +248,7 @@ class AgendaEvents extends DolibarrApi throw new RestException(404, 'actioncomm not found'); } - if (!DolibarrApi::_checkAccessToResource('actioncomm', $this->actioncomm->id)) { + if (!DolibarrApi::_checkAccessToResource('actioncomm', $this->actioncomm->id, 'actioncomm', '', 'fk_soc', 'id')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } foreach ($request_data as $field => $value) { @@ -290,7 +290,7 @@ class AgendaEvents extends DolibarrApi throw new RestException(404, 'Agenda Event not found'); } - if (!DolibarrApi::_checkAccessToResource('actioncomm', $this->actioncomm->id)) { + if (!DolibarrApi::_checkAccessToResource('actioncomm', $this->actioncomm->id, 'actioncomm', '', 'fk_soc', 'id')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); }