Merge pull request #5310 from aspangaro/4.0-p31

Fix: Accountancy - Right to access to fiscal year
This commit is contained in:
Laurent Destailleur 2016-06-06 13:37:00 +02:00
commit 06b1336ba9

View File

@ -42,7 +42,10 @@ if (! $sortorder) $sortorder="ASC";
$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;