Merge pull request #12061 from laudeco/hotfix/access_bank_account_user

FIX the access of the bank account of one user
This commit is contained in:
Laurent Destailleur 2019-10-08 08:56:29 +02:00 committed by GitHub
commit 958fdd5a40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,7 @@ $ok=false;
if ($user->id == $id) $ok=true; // A user can always read its own card
if (! empty($user->rights->salaries->read)) $ok=true;
if (! empty($user->rights->hrm->read)) $ok=true;
if (! empty($user->rights->expensereport->lire) && ($user->id == $object->id || $user->rights->expensereport->readall)) $ok=true;
if (! $ok)
{
accessforbidden();