Update security.lib.php
MAIN_EXTERNAL_USERS_CAN_SEE_SUBSIDIARY_COMPANIES
This commit is contained in:
parent
e6d35039c9
commit
9c51e62d0f
@ -584,7 +584,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
|
||||
}
|
||||
} elseif (!in_array($feature, $nocheck)) { // By default (case of $checkdefault), we check on object entity + link to third party on field $dbt_keyfield
|
||||
// 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 (empty($dbt_keyfield)) dol_print_error('', 'Param dbt_keyfield is required but not defined');
|
||||
$sql = "SELECT COUNT(dbt.".$dbt_keyfield.") as nb";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user