utilisation de accessforbidden

This commit is contained in:
Rodolphe Quiedeville 2003-08-06 12:28:02 +00:00
parent a13b1340cc
commit 89f3447cf7

View File

@ -22,6 +22,10 @@
require("./pre.inc.php3");
$user->getrights('produit');
if (!$user->rights->produit->lire)
accessforbidden();
if (strlen($type) == 0)
{
$type = 0;
@ -66,13 +70,6 @@ if ($action == 'update')
$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 .= $db->plimit($limit + 1 ,$offset);
$result = $db->query($sql) ;