From bbfafccf9d53858ff40d7e3c8fd7797bf157424e Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 23 Jan 2023 14:01:36 +0000 Subject: [PATCH] wait #5693 @0.5 --- .docker/docker-compose.yml | 5 +++++ inc/commons/DAO/class.common.dao.entreprise.php | 6 ++++++ inc/commons/class.common.core.php | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index aba0cc832..24ccfd3d7 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -155,6 +155,11 @@ services: - extranet - fluidbook-processfarm restart: unless-stopped + logging: + driver: json-file + options: + max-size: 10M + max-file: 10 redis: container_name: extranet-redis diff --git a/inc/commons/DAO/class.common.dao.entreprise.php b/inc/commons/DAO/class.common.dao.entreprise.php index 19e0fdd91..b44359c05 100644 --- a/inc/commons/DAO/class.common.dao.entreprise.php +++ b/inc/commons/DAO/class.common.dao.entreprise.php @@ -131,7 +131,13 @@ class commonDAOEntreprise extends commonDAO protected function limitToUserRights($user) { + global $core; if ($user) { + if (!$user->ws_rights) { + $core->refreshWSUsersTree(); + $core->authentifie(); + $user = $core->user; + } return ' AND entreprise_id IN (SELECT entreprise FROM e2_u WHERE utilisateur_id IN(' . $user->ws_rights . ') AND utilisateur_id!=\'' . $this->con->escape($user->utilisateur_id) . '\') '; } return ''; diff --git a/inc/commons/class.common.core.php b/inc/commons/class.common.core.php index f5cc308ce..c93ec2e9b 100644 --- a/inc/commons/class.common.core.php +++ b/inc/commons/class.common.core.php @@ -68,7 +68,7 @@ class commonCore extends cubeCore * * @return */ - protected function authentifie() + public function authentifie() { // On regarde si user_email et user_password ont été postées // Si c'est le cas, on les copie dans la session -- 2.39.5