FIX Permission for bookkeeper

This commit is contained in:
Laurent Destailleur 2018-04-09 10:47:26 +02:00
parent 0c0f950338
commit 0475cb8018
2 changed files with 3 additions and 1 deletions

View File

@ -53,6 +53,7 @@ $code=GETPOST('code','alpha');
$allowed=$user->admin;
if ($id == 7 && ! empty($user->rights->accounting->chartofaccount)) $allowed=1; // Tax page allowed to manager of chart account
if ($id == 10 && ! empty($user->rights->accounting->chartofaccount)) $allowed=1; // Vat page allowed to manager of chart account
if ($id == 17 && ! empty($user->rights->accounting->chartofaccount)) $allowed=1; // Dictionary with type of expense report and accounting account allowed to manager of chart account
if (! $allowed) accessforbidden();
$acts[0] = "activate";

View File

@ -54,7 +54,8 @@ $optioncss = GETPOST('optioncss','alpha');
// Security check
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'banque');
if (! empty($user->rights->accounting->chartofaccount)) $allowed=1; // Dictionary with list of banks accounting account allowed to manager of chart account
if (! $allowed) $result=restrictedArea($user,'banque');
$diroutputmassaction=$conf->bank->dir_output . '/temp/massgeneration/'.$user->id;