Update security.lib.php

This commit is contained in:
Bahfir Abbes 2021-03-11 04:02:30 +01:00 committed by GitHub
parent 1359326337
commit 0158cbb893
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -493,7 +493,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
} elseif (in_array($feature, $checksoc)) // We check feature = checksoc
{
// If external user: Check permission for external users
if ($user->socid > 0 && empty($conf->global->MAIN_SHOW_SOCIETE2EXTERN))
if ($user->socid > 0 && empty($conf->global->MAIN_EXTERNAL_USERS_CAN_SEE_SUBSIDIARY_COMPANIES))
{
if ($user->socid <> $objectid) return false;
} // If internal user: Check permission for internal users that are restricted on their objects