Fixing style errors.

This commit is contained in:
stickler-ci 2021-03-11 15:37:27 +00:00
parent c596eb91a8
commit 345fe648b3
2 changed files with 5 additions and 5 deletions

View File

@ -623,10 +623,10 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
// 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 <> $objectid) {
return false;
}
return false;
}
} 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 .= " FROM (".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= ", ".MAIN_DB_PREFIX."societe as s)";

View File

@ -81,10 +81,10 @@ $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)) {
$socid = $user->socid;
$socid = $user->socid;
}
if (empty($socid) && $action == 'view') {
$action = 'create';
$action = 'create';
}
$object = new Societe($db);