Skip to content

Commit

Permalink
FIX #6679 User with restricted supplier invoice permissions can edit …
Browse files Browse the repository at this point in the history
…project, payment conditions, payment mode

Close #6679
  • Loading branch information
marcosgdf committed Apr 9, 2017
1 parent fe4f712 commit 12df7b6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions htdocs/fourn/facture/card.php
Expand Up @@ -870,7 +870,7 @@
$action = '';
}

elseif ($action == 'classin')
elseif ($action == 'classin' && $user->rights->fournisseur->facture->creer)
{
$object->fetch($id);
$result=$object->setProject($projectid);
Expand Down Expand Up @@ -1844,7 +1844,9 @@
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentConditions');
print '<td>';
if ($action != 'editconditions') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;id='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
if ($action != 'editconditions' && $user->rights->fournisseur->facture->creer) {
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;id='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
}
print '</tr></table>';
print '</td><td colspan="2">';
if ($action == 'editconditions')
Expand All @@ -1864,7 +1866,9 @@
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentMode');
print '</td>';
if ($action != 'editmode') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;id='.$object->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
if ($action != 'editmode' && $user->rights->fournisseur->facture->creer) {
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;id='.$object->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
}
print '</tr></table>';
print '</td><td colspan="2">';
if ($action == 'editmode')
Expand Down Expand Up @@ -1994,7 +1998,7 @@
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Project');
print '</td>';
if ($action != 'classify')
if ($action != 'classify' && $user->rights->fournisseur->facture->creer)
{
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classify&amp;id='.$object->id.'">';
print img_edit($langs->trans('SetProject'),1);
Expand Down

0 comments on commit 12df7b6

Please sign in to comment.