From a09228e7d3e27b3c56d96f1142bb4be0b955f345 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 30 Aug 2005 14:52:40 +0000 Subject: [PATCH] Modification des permissions --- htdocs/telephonie/client/ca.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/telephonie/client/ca.php b/htdocs/telephonie/client/ca.php index c71beecb237..b09a63b0b8f 100644 --- a/htdocs/telephonie/client/ca.php +++ b/htdocs/telephonie/client/ca.php @@ -38,9 +38,14 @@ if ($cancel == $langs->trans("Cancel")) if ($_GET["id"]) { $soc = new Societe($db); - $result = $soc->fetch($_GET["id"]); + $result = $soc->fetch($_GET["id"], $user); - if ( $result == 1 ) + if (!$soc->perm_read) + { + print "Lecture non authorisée"; + } + + if ( $result == 1 && $soc->perm_read) { if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') {