From ea1fe8b31b103ef4c28b69f2608895b001fe4993 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 11 Mar 2006 02:18:26 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Ne=20permettait=20plus=20de=20cr=E9er=20?= =?UTF-8?q?des=20tiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/soc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/soc.php b/htdocs/soc.php index 7adbdaed3c9..6c624835e7f 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -31,7 +31,10 @@ */ require("pre.inc.php"); + $user->getrights('societe'); +$user->getrights('commercial'); + $langs->load("companies"); $langs->load("commercial"); $langs->load("bills"); @@ -45,8 +48,7 @@ if (! $user->rights->societe->creer) } $socid = isset($_GET["socid"])?$_GET["socid"]:''; - -if ($socid == '') accessforbidden(); +if (! $socid && ($_GET["action"] != 'create' && $_POST["action"] == 'create')) accessforbidden(); // Sécurité accés client if ($user->societe_id > 0)