Fix: Access to category of third party

This commit is contained in:
Laurent Destailleur 2008-02-29 00:45:27 +00:00
parent 2f61e50948
commit 8b5d43a41b
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ if ($_REQUEST["socid"])
if ($_REQUEST["typeid"] == 1) { $type = 'fournisseur'; $socid = isset($_REQUEST["socid"])?$_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"]:''; } if ($_REQUEST["typeid"] == 2) { $type = 'societe'; $socid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:''; }
$objectid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:''; $objectid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:'';
$type = 'societe';
} }
else if ($_REQUEST["id"] || $_REQUEST["ref"]) else if ($_REQUEST["id"] || $_REQUEST["ref"])
{ {

View File

@ -1251,7 +1251,7 @@ function restrictedArea($user, $feature='societe', $objectid=0, $dbtablename='')
{ {
if (! $user->rights->fournisseur->commande->lire) $readok=0; if (! $user->rights->fournisseur->commande->lire) $readok=0;
} }
else else if (! empty($features))
{ {
if (! $user->rights->$feature->lire) $readok=0; if (! $user->rights->$feature->lire) $readok=0;
} }