Fix #12371 : access rights on contacts

This commit is contained in:
Maxime Kohlhaas 2019-11-30 14:48:05 +01:00
parent 9095482113
commit 916954b301
2 changed files with 2 additions and 1 deletions

View File

@ -52,7 +52,7 @@ function societe_prepare_head(Societe $object)
if (empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES))
{
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->societe->contact->lire)
{
//$nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external'));
$nbContact = 0; // TODO

View File

@ -88,6 +88,7 @@ if (! empty($canvas))
// Security check
$result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', $objcanvas);
if(empty($user->rights->societe->contact->lire)) accessforbidden();