From 832091fc8d7596857abf6247bc27b548b5a5769d Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 7 Sep 2005 08:14:35 +0000 Subject: [PATCH] Modif permissions --- htdocs/telephonie/contrat/stats.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/telephonie/contrat/stats.php b/htdocs/telephonie/contrat/stats.php index 884f054768e..e8dd06e8f1f 100644 --- a/htdocs/telephonie/contrat/stats.php +++ b/htdocs/telephonie/contrat/stats.php @@ -29,11 +29,18 @@ llxHeader("","T if ($_GET["id"]) { + $client_comm = new Societe($db); $contrat = new TelephonieContrat($db); $result = $contrat->fetch($_GET["id"]); + $client_comm->fetch($contrat->client_comm_id, $user); - if ( $result == 1 ) + if (!$client_comm->perm_read) + { + print "Lecture non authorisée"; + } + + if ( $result && $client_comm->perm_read) { if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') {