Merge pull request #12547 from frederic34/patch-7

The property ownerid does not exist on ActionComm
This commit is contained in:
Laurent Destailleur 2019-11-30 01:25:51 +01:00 committed by GitHub
commit d43c1d3904
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,7 @@ class AgendaEvents extends DolibarrApi
throw new RestException(404, 'Agenda Events not found');
}
if (! DolibarrApiAccess::$user->rights->agenda->allactions->read && $this->actioncomm->ownerid != DolibarrApiAccess::$user->id) {
if (! DolibarrApiAccess::$user->rights->agenda->allactions->read && $this->actioncomm->userownerid != DolibarrApiAccess::$user->id) {
throw new RestException(401, "Insufficient rights to read event for owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id);
}