utilisation de accessforbidden
This commit is contained in:
parent
a13b1340cc
commit
89f3447cf7
@ -22,6 +22,10 @@
|
|||||||
require("./pre.inc.php3");
|
require("./pre.inc.php3");
|
||||||
$user->getrights('produit');
|
$user->getrights('produit');
|
||||||
|
|
||||||
|
if (!$user->rights->produit->lire)
|
||||||
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
if (strlen($type) == 0)
|
if (strlen($type) == 0)
|
||||||
{
|
{
|
||||||
$type = 0;
|
$type = 0;
|
||||||
@ -66,13 +70,6 @@ if ($action == 'update')
|
|||||||
$sql .= " AND lower(p.label) like '%".strtolower($snom)."%'";
|
$sql .= " AND lower(p.label) like '%".strtolower($snom)."%'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->produit->lire == 0)
|
|
||||||
{
|
|
||||||
// sécurité
|
|
||||||
$sql .= " AND 1 = 2";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$sql .= " ORDER BY $sortfield $sortorder ";
|
$sql .= " ORDER BY $sortfield $sortorder ";
|
||||||
$sql .= $db->plimit($limit + 1 ,$offset);
|
$sql .= $db->plimit($limit + 1 ,$offset);
|
||||||
$result = $db->query($sql) ;
|
$result = $db->query($sql) ;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user