fix:Handle constant MAIN_SHOW_SOCIETE2EXTERN in checkUserAccessToObject
This commit is contained in:
parent
50797bf892
commit
e6d35039c9
@ -584,7 +584,8 @@ 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) {
|
||||
if ($user->socid > 0 && empty($conf->global->MAIN_SHOW_SOCIETE2EXTERN))
|
||||
{
|
||||
if (empty($dbt_keyfield)) dol_print_error('', 'Param dbt_keyfield is required but not defined');
|
||||
$sql = "SELECT COUNT(dbt.".$dbt_keyfield.") as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user