From ff94849b0cf98e2dfba9df9a3dce28fc2cf766d9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 May 2013 19:57:51 +0200 Subject: [PATCH] Fix: Security test --- htdocs/core/lib/company.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index dddc5610609..de42a730b2b 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -60,7 +60,7 @@ function societe_prepare_head($object) $head[$h][2] = 'supplier'; $h++; } - if (! empty($conf->agenda->enabled)) + if (! empty($conf->agenda->enabled) && !empty($user->right->agenda->lire)) { $head[$h][0] = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id; $head[$h][1] = $langs->trans("Agenda"); @@ -68,7 +68,7 @@ function societe_prepare_head($object) $h++; } //show categorie tab - if (! empty($conf->categorie->enabled)) + if (! empty($conf->categorie->enabled) && !empty($user->right->categorie->lire)) { $type = 2; if ($object->fournisseur) $type = 1;