From a5d18a6fe1199b039f54960b6988f58396f3e679 Mon Sep 17 00:00:00 2001 From: loviuz Date: Thu, 30 Apr 2020 14:51:16 +0200 Subject: [PATCH] Fix permessi alle API sync calendario da cliente --- modules/interventi/src/API/v1/Sync.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/interventi/src/API/v1/Sync.php b/modules/interventi/src/API/v1/Sync.php index b8b32f9ae..61561294f 100755 --- a/modules/interventi/src/API/v1/Sync.php +++ b/modules/interventi/src/API/v1/Sync.php @@ -28,6 +28,10 @@ class Sync extends Resource implements RetrieveInterface, UpdateInterface $query .= ' AND in_interventi_tecnici.idtecnico = '.prepare($user['idanagrafica']); } + if ($user->anagrafica->isTipo('Cliente')) { + $query .= ' AND in_interventi.idanagrafica = '.prepare($user['idanagrafica']); + } + $rs = $database->fetchArray($query); $result = '';