Fix permessi alle API sync calendario da cliente

This commit is contained in:
loviuz 2020-04-30 14:51:16 +02:00
parent d97afff1c9
commit a5d18a6fe1
1 changed files with 4 additions and 0 deletions

View File

@ -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 = '';