diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 3f251e0090b68492badd2743de81747e1df01598..99b78ff7c5ca5460ab4747955601c413679ca621 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -43,7 +43,9 @@ $search_pcgtype = GETPOST("search_pcgtype"); $search_pcgsubtype = GETPOST("search_pcgsubtype"); // Security check -if (! $user->admin) +if ($user->societe_id > 0) + accessforbidden(); +if (! $user->rights->accounting->chartofaccount) accessforbidden(); $sortfield = GETPOST("sortfield", 'alpha'); diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 75411d6402f11a60d77c81715aeb693fab0a6316..199e04bb856a57dba929c87c82139185e224b1f5 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +/* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,12 +30,15 @@ $action = GETPOST('action'); $langs->load("admin"); $langs->load("compta"); -if (! $user->admin) +// Security check +if ($user->societe_id > 0) + accessforbidden(); +if (! $user->rights->accounting->fiscalyear) accessforbidden(); $error = 0; -// List of statut +// List of status static $tmpstatut2label = array ( '0' => 'OpenFiscalYear', '1' => 'CloseFiscalYear'