Fixing style errors.
This commit is contained in:
parent
c596eb91a8
commit
345fe648b3
@ -623,10 +623,10 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
|
|||||||
// If external user: Check permission for external users
|
// 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 && empty($conf->global->MAIN_EXTERNAL_USERS_CAN_SEE_SUBSIDIARY_COMPANIES)) {
|
||||||
if ($user->socid <> $objectid) {
|
if ($user->socid <> $objectid) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && !$user->rights->societe->client->voir)) {
|
} elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && !$user->rights->societe->client->voir)) {
|
||||||
// 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
|
||||||
$sql = "SELECT COUNT(sc.fk_soc) as nb";
|
$sql = "SELECT COUNT(sc.fk_soc) as nb";
|
||||||
$sql .= " FROM (".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
$sql .= " FROM (".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s)";
|
$sql .= ", ".MAIN_DB_PREFIX."societe as s)";
|
||||||
|
|||||||
@ -81,10 +81,10 @@ $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 && empty($conf->global->MAIN_EXTERNAL_USERS_CAN_SEE_SUBSIDIARY_COMPANIES)) {
|
if ($user->socid && empty($conf->global->MAIN_EXTERNAL_USERS_CAN_SEE_SUBSIDIARY_COMPANIES)) {
|
||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
if (empty($socid) && $action == 'view') {
|
if (empty($socid) && $action == 'view') {
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user