Skip to content
Snippets Groups Projects
Commit 69eb64a9 authored by Laurent Destailleur's avatar Laurent Destailleur Committed by GitHub
Browse files

Merge pull request #6463 from laudeco/fix/expense_report_validation

use access right to validate expense report created for someone else
parents e981e719 6961db00
Branches
Tags
No related merge requests found
......@@ -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>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment