From d478d8c1fe348bfbf9afe5a6f54504d98494020e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 Sep 2013 11:56:42 +0200 Subject: [PATCH] Fix: Permission to read an event should depend on agenda module permissions. We add a check for thirdparty for external users --- htdocs/comm/action/fiche.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index a0daa7b79f4..94941d53e6c 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -56,8 +56,8 @@ $contactid=GETPOST('contactid','int'); $socid = GETPOST('socid','int'); $id = GETPOST('id','int'); if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user,'societe',$id,'&societe'); -//$result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions&allactions', '', 'id'); +$result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions&allactions', '', 'id'); +if ($user->societe_id && $socid) $result = restrictedArea($user,'societe',$socid); $error=GETPOST("error"); $mesg='';