Ajout des droits
This commit is contained in:
parent
ead6c895f7
commit
b356331ab2
@ -24,11 +24,19 @@ require("./pre.inc.php3");
|
|||||||
require("../propal.class.php3");
|
require("../propal.class.php3");
|
||||||
require("../facture.class.php3");
|
require("../facture.class.php3");
|
||||||
|
|
||||||
llxHeader();
|
$user->getrights('produit');
|
||||||
|
|
||||||
$db = new Db();
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
|
if (!$user->rights->produit->lire)
|
||||||
|
{
|
||||||
|
llxHeader();
|
||||||
|
print "Accés non authorisé";
|
||||||
|
llxFooter();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
if ($action == 'add')
|
if ($action == 'add')
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
@ -71,7 +79,7 @@ if ($action == 'addinfacture')
|
|||||||
$mesg .= '<a href="../compta/facture.php3?facid='.$facture->id.'">'.$facture->ref.'</a>';
|
$mesg .= '<a href="../compta/facture.php3?facid='.$facture->id.'">'.$facture->ref.'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'update' && $cancel <> 'Annuler')
|
if ($HTTP_POST_VARS["action"] == 'update' && $cancel <> 'Annuler' && ( $user->rights->produit->modifier || $user->rights->produit->creer))
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
|
|
||||||
@ -306,7 +314,14 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td width="20%" align="center">[<a href="fiche.php3?action=edit&id='.$id.'">Editer</a>]</td>';
|
if ($user->rights->produit->modifier || $user->rights->produit->creer)
|
||||||
|
{
|
||||||
|
print '<td width="20%" align="center">[<a href="fiche.php3?action=edit&id='.$id.'">Editer</a>]</td>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<td width="20%" align="center">-</td>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print '<td width="20%" align="center">-</td>';
|
print '<td width="20%" align="center">-</td>';
|
||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user