Skip to content

Commit

Permalink
Fix: Accountancy - Access rights
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed Jun 5, 2016
1 parent 4870cd7 commit 23b748a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion htdocs/accountancy/admin/account.php
Expand Up @@ -43,7 +43,9 @@
$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');
Expand Down
9 changes: 6 additions & 3 deletions 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
Expand Down Expand Up @@ -30,12 +30,15 @@
$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'
Expand Down

0 comments on commit 23b748a

Please sign in to comment.