diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index fed76abed07..0c86da36936 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -805,7 +805,7 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid) } } -if ($action == "addline") +if ($action == "addline" && $user->rights->expensereport->creer) { $error = 0; @@ -896,7 +896,7 @@ if ($action == "addline") $action=''; } -if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes") +if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes" && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); @@ -939,7 +939,7 @@ if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes") } } -if ($action == "updateligne" ) +if ($action == "updateligne" && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); @@ -1647,7 +1647,7 @@ else print ''.$langs->trans('AmountTTC').''; } // Ajout des boutons de modification/suppression - if ($object->fk_statut < 2 || $object->fk_statut==99) + if (($object->fk_statut < 2 || $object->fk_statut==99) && $user->rights->expensereport->creer) { print ''; } @@ -1690,7 +1690,7 @@ else } // Ajout des boutons de modification/suppression - if($object->fk_statut<2 OR $object->fk_statut==99) + if(($object->fk_statut<2 OR $object->fk_statut==99) && $user->rights->expensereport->creer) { print ''; print 'rowid.'#'.$objp->rowid.'">'; @@ -1770,7 +1770,7 @@ else //print ''; // Add a line - if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline') + if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline' && $user->rights->expensereport->creer) { print_fiche_titre($langs->trans("AddLine"),'','');