Withdrawls: Add user permission control
This commit is contained in:
parent
59fa268fd9
commit
e16eda8308
@ -143,7 +143,7 @@ if ($_GET["id"])
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["action"] == 'rejet')
|
if ($_GET["action"] == 'rejet' && $user->rights->prelevement->bons->creer)
|
||||||
{
|
{
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
@ -200,10 +200,14 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
if ($_GET["action"] == '')
|
if ($_GET["action"] == '')
|
||||||
{
|
{
|
||||||
if ($bon->statut == 2 && $lipre->statut == 2)
|
if ($bon->statut == 2 && $lipre->statut == 2 && $user->rights->prelevement->bons->credit)
|
||||||
{
|
{
|
||||||
print "<a class=\"butAction\" href=\"ligne.php?action=rejet&id=$lipre->id\">".$langs->trans("StandingOrderReject")."</a>";
|
print "<a class=\"butAction\" href=\"ligne.php?action=rejet&id=$lipre->id\">".$langs->trans("StandingOrderReject")."</a>";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "<a class=\"butActionRefused\" href=\"#\">".$langs->trans("StandingOrderReject")."</a>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user