From 8b5d43a41b8bc8c1de66c0d1990c8a66519a77cf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Feb 2008 00:45:27 +0000 Subject: [PATCH] Fix: Access to category of third party --- htdocs/categories/categorie.php | 1 + htdocs/lib/functions.inc.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 611291556bd..2764f8371f3 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -39,6 +39,7 @@ if ($_REQUEST["socid"]) if ($_REQUEST["typeid"] == 1) { $type = 'fournisseur'; $socid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:''; } if ($_REQUEST["typeid"] == 2) { $type = 'societe'; $socid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:''; } $objectid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:''; + $type = 'societe'; } else if ($_REQUEST["id"] || $_REQUEST["ref"]) { diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 8422f5d5713..22ea9b3a2b2 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -1251,7 +1251,7 @@ function restrictedArea($user, $feature='societe', $objectid=0, $dbtablename='') { if (! $user->rights->fournisseur->commande->lire) $readok=0; } - else + else if (! empty($features)) { if (! $user->rights->$feature->lire) $readok=0; }