update code

This commit is contained in:
Philippe GRAND 2022-09-06 16:37:06 +02:00
parent eccd46c5c5
commit e04b7333b1
3 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ $permissiontodelete = $user->hasRight('accounting', 'chartofaccount');
if ($user->socid > 0) {
accessforbidden();
}
if (empty($user->rights->accounting->chartofaccount)) {
if (!$user->hasRight('accounting', 'chartofaccount')) {
accessforbidden();
}

View File

@ -48,7 +48,7 @@ $label = GETPOST('label', 'alpha');
if ($user->socid > 0) {
accessforbidden();
}
if (empty($user->rights->accounting->chartofaccount)) {
if (!$user->hasRight('accounting', 'chartofaccount')) {
accessforbidden();
}

View File

@ -44,7 +44,7 @@ if ($cat_id == 0) {
}
// Security check
if (empty($user->rights->accounting->chartofaccount)) {
if (!$user->hasRight('accounting', 'chartofaccount')) {
accessforbidden();
}