Fix: security with multi-company
This commit is contained in:
parent
d144a2af4d
commit
524f01348c
@ -37,9 +37,8 @@ $langs->load("bills");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -42,9 +42,8 @@ $action=empty($_GET['action']) ? (empty($_POST['action']) ? '' : $_POST['action'
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -39,9 +39,8 @@ $langs->load("bills");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -38,9 +38,8 @@ $langs->load("bills");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -38,9 +38,8 @@ $langs->load("bills");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -39,9 +39,8 @@ $langs->load("products");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -39,9 +39,8 @@ $langs->load("companies");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -39,9 +39,8 @@ $langs->load("companies");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -38,9 +38,8 @@ $langs->load("companies");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -39,9 +39,8 @@ $langs->load("products");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -40,9 +40,8 @@ $langs->load("companies");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -42,9 +42,8 @@ $mode=isset($_GET["mode"])?$_GET["mode"]:'byunit';
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -38,9 +38,8 @@ $langs->load("companies");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -40,9 +40,8 @@ $langs->load("bills");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
@ -39,9 +39,8 @@ $langs->load("bills");
|
||||
if (isset($_GET["id"]) || isset($_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;
|
||||
$result=restrictedArea($user,'produit',$id,'product','','',$fieldid);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user