Fix: security with multi-company
This commit is contained in:
parent
aee2dcff57
commit
d144a2af4d
@ -44,11 +44,10 @@ $langs->load("stocks");
|
|||||||
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||||
{
|
{
|
||||||
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
$id = isset($_GET["id"])?$_GET["id"]:(isset($_GET["ref"])?$_GET["ref"]:'');
|
||||||
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
|
||||||
}
|
}
|
||||||
|
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid?$fieldid:'rowid');
|
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user