Merge pull request #7115 from atm-florian/dev_fix_accountancy

FIX accountancy right management on setup pages
This commit is contained in:
Laurent Destailleur 2017-07-07 20:08:21 +02:00 committed by GitHub
commit 441c4b9b71
7 changed files with 18 additions and 18 deletions

View File

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

View File

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

View File

@ -42,7 +42,7 @@ $langs->load("salaries");
$langs->load("loan"); $langs->load("loan");
// Security check // Security check
if (! empty($user->rights->accountancy->chartofaccount)) if (empty($user->rights->accounting->chartofaccount))
{ {
accessforbidden(); accessforbidden();
} }

View File

@ -38,7 +38,7 @@ $langs->load("admin");
$langs->load("accountancy"); $langs->load("accountancy");
// Security check // Security check
if (empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount)) if (empty($user->admin) && empty($user->rights->accounting->chartofaccount))
{ {
accessforbidden(); accessforbidden();
} }

View File

@ -266,7 +266,7 @@ if (! empty($user->admin))
} }
// Param a user $user->rights->accountancy->chartofaccount can access // Param a user $user->rights->accounting->chartofaccount can access
foreach ($list as $key) foreach ($list as $key)
{ {
print '<tr class="oddeven value">'; print '<tr class="oddeven value">';

View File

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