New:Constant MAIN_SHOW_SOCIETE2EXTERN to allow access to any thirdparty for external users
This commit is contained in:
parent
50797bf892
commit
d82c62c40d
@ -493,7 +493,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
|
|||||||
} elseif (in_array($feature, $checksoc)) // We check feature = checksoc
|
} elseif (in_array($feature, $checksoc)) // We check feature = checksoc
|
||||||
{
|
{
|
||||||
// If external user: Check permission for external users
|
// If external user: Check permission for external users
|
||||||
if ($user->socid > 0)
|
if ($user->socid > 0 && empty($conf->global->MAIN_SHOW_SOCIETE2EXTERN))
|
||||||
{
|
{
|
||||||
if ($user->socid <> $objectid) return false;
|
if ($user->socid <> $objectid) return false;
|
||||||
} // If internal user: Check permission for internal users that are restricted on their objects
|
} // If internal user: Check permission for internal users that are restricted on their objects
|
||||||
|
|||||||
@ -64,7 +64,7 @@ $backtopage = GETPOST('backtopage', 'alpha');
|
|||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
|
|
||||||
$socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int');
|
$socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int');
|
||||||
if ($user->socid) $socid = $user->socid;
|
if ($user->socid && empty($conf->global->MAIN_SHOW_SOCIETE2EXTERN)) $socid = $user->socid;
|
||||||
if (empty($socid) && $action == 'view') $action = 'create';
|
if (empty($socid) && $action == 'view') $action = 'create';
|
||||||
|
|
||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user