From 4d916f3c9f83d58c91a269657f9297eec12b6f91 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Apr 2021 17:23:16 +0200 Subject: [PATCH] Fix perm --- htdocs/accountancy/index.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 94dc6aa05c9..d073139a533 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -35,16 +35,23 @@ $langs->loadLangs(array("compta", "bills", "other", "accountancy", "loans", "ban $hookmanager->initHooks(array('accountancyindex')); // Security check -if (empty($conf->accounting->enabled)) { +if ($user->socid > 0) { accessforbidden(); } -if ($user->socid > 0) { +/* +if (empty($conf->accounting->enabled)) { accessforbidden(); } if (empty($user->rights->accounting->mouvements->lire)) { accessforbidden(); } - +*/ +if (empty($conf->comptabilite->enabled) && empty($conf->accounting->enabled) && empty($conf->asset->enabled) && empty($conf->intracommreport->enabled)) { + accessforbidden(); +} +if (empty($user->rights->compta->resultat->lire) && empty($user->rights->accounting->mouvements->lire) && empty($user->rights->asset->read) && empty($user->rights->intracommreport->read)) { + accessforbidden(); +} /*