From 2a7b04e795c1d62056c6cbecc15a9bb1700acd83 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 23 Nov 2017 12:18:49 +0100 Subject: [PATCH] Fix: wrong table name and id field name --- htdocs/comm/action/class/api_agendaevents.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 4edd656da53..252d2915050 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -76,7 +76,7 @@ class AgendaEvents extends DolibarrApi throw new RestException(401, "Insuffisant rights to read event for owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id); } - if ( ! DolibarrApi::_checkAccessToResource('agenda',$this->actioncomm->id)) { + if ( ! DolibarrApi::_checkAccessToResource('agenda',$this->actioncomm->id,'actioncomm','','fk_soc','id')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); }