Skip to content

Commit

Permalink
Fix: bad rights
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Jan 9, 2012
1 parent a85a08c commit d4568f5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions htdocs/fourn/commande/contact.php
Expand Up @@ -44,8 +44,7 @@
/*
* Ajout d'un nouveau contact
*/

if ($_POST["action"] == 'addcontact' && $user->rights->commande->creer)
if ($_POST["action"] == 'addcontact' && $user->rights->fournisseur->commande->creer)
{

$result = 0;
Expand Down Expand Up @@ -76,7 +75,7 @@
}
}
// modification d'un contact. On enregistre le type
if ($_POST["action"] == 'updateligne' && $user->rights->commande->creer)
if ($_POST["action"] == 'updateligne' && $user->rights->fournisseur->commande->creer)
{
$commande = new CommandeFournisseur($db);
if ($commande->fetch($_GET["id"]))
Expand All @@ -101,7 +100,7 @@
}

// bascule du statut d'un contact
if ($_GET["action"] == 'swapstatut' && $user->rights->commande->creer)
if ($_GET["action"] == 'swapstatut' && $user->rights->fournisseur->commande->creer)
{
$commande = new CommandeFournisseur($db);
if ($commande->fetch($_GET["id"]))
Expand All @@ -126,7 +125,7 @@
}

// Efface un contact
if ($_GET["action"] == 'deleteline' && $user->rights->commande->creer)
if ($_GET["action"] == 'deleteline' && $user->rights->fournisseur->commande->creer)
{
$commande = new CommandeFournisseur($db);
$commande->fetch($_GET["id"]);
Expand Down Expand Up @@ -367,7 +366,7 @@

// Icon update et delete
print '<td align="center" nowrap>';
if ($commande->statut < 5 && $user->rights->commande->creer)
if ($commande->statut < 5 && $user->rights->fournisseur->commande->creer)
{
print '&nbsp;';
print '<a href="contact.php?id='.$commande->id.'&amp;action=deleteline&amp;lineid='.$tab[$i]['rowid'].'">';
Expand Down

0 comments on commit d4568f5

Please sign in to comment.