update code
This commit is contained in:
parent
644a23a0ac
commit
3a5abf12bc
@ -45,7 +45,7 @@ $rowid = GETPOST('rowid', 'alpha');
|
||||
$code = GETPOST('code', 'alpha');
|
||||
|
||||
// Security access
|
||||
if (empty($user->rights->accounting->chartofaccount)) {
|
||||
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ $search_type = GETPOST('search_type', 'int');
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->chartofaccount)) {
|
||||
if (!$user->hasRight('accounting', 'chartofaccount')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
@ -54,13 +54,13 @@ $entity = GETPOST('entity', 'int');
|
||||
$code = GETPOST('code', 'alpha');
|
||||
|
||||
$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
|
||||
}
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
if (!$allowed) {
|
||||
|
||||
@ -69,7 +69,7 @@ if ($user->socid) {
|
||||
}
|
||||
|
||||
$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
|
||||
}
|
||||
if (!$allowed) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user