Merge pull request #23786 from glu000/16.0-issue-23785

Fix #23785 Box "Last changed vendors": External users can see all suppliers on htdocs/comm/index.php
This commit is contained in:
Laurent Destailleur 2023-02-06 00:18:21 +01:00 committed by GitHub
commit e04a44e4ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,19 +60,11 @@ if (isset($user->socid) && $user->socid > 0) {
$socid = $user->socid;
}
restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0);
$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
$now = dol_now();
// Security check
$socid = GETPOST("socid", 'int');
if ($user->socid > 0) {
$action = '';
$id = $user->socid;
} else {
$id = 0;
}
restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0);
$maxofloop = (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD);