Merge pull request #20069 from vincentjdc/expensse-report-download-fix

Fixes expensereport downloads
This commit is contained in:
Laurent Destailleur 2022-02-16 20:37:32 +01:00 committed by GitHub
commit a7fab01059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -892,8 +892,10 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl
}
if ($feature == 'expensereport') {
$useridtocheck = $object->fk_user_author;
if (!in_array($useridtocheck, $childids)) {
return false;
if (!$user->rights->expensereport->readall) {
if (!in_array($useridtocheck, $childids)) {
return false;
}
}
}
}