Merge pull request #6463 from laudeco/fix/expense_report_validation
use access right to validate expense report created for someone else
This commit is contained in:
commit
69eb64a975
@ -2092,7 +2092,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
*/
|
||||
if ($user->rights->expensereport->creer && $object->fk_statut==0)
|
||||
{
|
||||
if (in_array($object->fk_user_author, $user->getAllChildIds(1)))
|
||||
if (in_array($object->fk_user_author, $user->getAllChildIds(1)) || !empty($user->rights->expensereport->writeall_advance))
|
||||
{
|
||||
// Modify
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$object->id.'">'.$langs->trans('Modify').'</a></div>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user