Skip to content
Snippets Groups Projects
Commit 6961db00 authored by De Coninck Laurent's avatar De Coninck Laurent
Browse files

use access right to validate expense report created for someone else

parent e981e719
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