Removed option MAIN_EXTERNAL_USERS_CAN_SEE_SUBSIDIARY_COMPANIES. The
implmentation did not make any test on subsidiaries. It has same effect than being an internal user.
This commit is contained in:
parent
e9f9cf62af
commit
78aec3daae
@ -621,7 +621,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_EXTERNAL_USERS_CAN_SEE_SUBSIDIARY_COMPANIES)) {
|
||||
if ($user->socid > 0) {
|
||||
if ($user->socid <> $objectid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ $backtopage = GETPOST('backtopage', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
$socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int');
|
||||
if ($user->socid && empty($conf->global->MAIN_EXTERNAL_USERS_CAN_SEE_SUBSIDIARY_COMPANIES)) {
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
if (empty($socid) && $action == 'view') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user