update code

This commit is contained in:
Philippe GRAND 2022-09-06 16:40:07 +02:00
parent 644a23a0ac
commit 3a5abf12bc
4 changed files with 6 additions and 6 deletions

View File

@ -45,7 +45,7 @@ $rowid = GETPOST('rowid', 'alpha');
$code = GETPOST('code', 'alpha'); $code = GETPOST('code', 'alpha');
// Security access // Security access
if (empty($user->rights->accounting->chartofaccount)) { if (!$user->hasRight('accounting', 'chartofaccount')) {
accessforbidden(); accessforbidden();
} }

View File

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

View File

@ -54,13 +54,13 @@ $entity = GETPOST('entity', 'int');
$code = GETPOST('code', 'alpha'); $code = GETPOST('code', 'alpha');
$allowed = $user->admin; $allowed = $user->admin;
if ($id == 7 && !empty($user->rights->accounting->chartofaccount)) { if ($id == 7 && $user->hasRight('accounting', 'chartofaccount')) {
$allowed = 1; // Tax page allowed to manager of chart account $allowed = 1; // Tax page allowed to manager of chart account
} }
if ($id == 10 && !empty($user->rights->accounting->chartofaccount)) { if ($id == 10 && $user->hasRight('accounting', 'chartofaccount')) {
$allowed = 1; // Vat page allowed to manager of chart account $allowed = 1; // Vat page allowed to manager of chart account
} }
if ($id == 17 && !empty($user->rights->accounting->chartofaccount)) { if ($id == 17 && $user->hasRight('accounting', 'chartofaccount')) {
$allowed = 1; // Dictionary with type of expense report and accounting account allowed to manager of chart account $allowed = 1; // Dictionary with type of expense report and accounting account allowed to manager of chart account
} }
if (!$allowed) { if (!$allowed) {

View File

@ -69,7 +69,7 @@ if ($user->socid) {
} }
$allowed = 0; $allowed = 0;
if (!empty($user->rights->accounting->chartofaccount)) { if ($user->hasRight('accounting', 'chartofaccount')) {
$allowed = 1; // Dictionary with list of banks accounting account allowed to manager of chart account $allowed = 1; // Dictionary with list of banks accounting account allowed to manager of chart account
} }
if (!$allowed) { if (!$allowed) {