From 179325447ff26e6ec141f3bad21555436f5ecec7 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 28 Jul 2017 12:46:17 +0200 Subject: [PATCH] Revert "Use session and not exec sql if already exists acl perms in session - #1017" This reverts commit 78bb583824ebe779b263852493d1e2a4144235b0. --- pandora_console/include/functions.php | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 1ef37e74bc..b4e25c9eac 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1796,26 +1796,6 @@ function check_acl($id_user, $id_group, $access, $onlyOneGroup = false) { $id_group = (int) $id_group; } - if($_SESSION['check_acl'] != null){ - if (empty ($_SESSION['check_acl'])) - return 0; - - $result = 0; - $acl_column = get_acl_column($access); - foreach ($_SESSION['check_acl'] as $row) { - // For each profile for this pair of group and user do... - if (isset($row[$acl_column])) { - $result += $row[$acl_column]; - } - } - - if ($result >= 1) { - return 1; - } - - return 0; - } - $parents_id = array($id_group); if ($id_group != 0 && $onlyOneGroup !== true) { $group = db_get_row_filter('tgrupo', array('id_grupo' => $id_group)); @@ -1864,13 +1844,8 @@ function check_acl($id_user, $id_group, $access, $onlyOneGroup = false) { OR tusuario_perfil.id_grupo = 0)", $id_user, implode(', ', $parents_id)); } - - - $rowdup = db_get_all_rows_sql ($query); - $_SESSION['check_acl'] = $rowdup; - if (empty ($rowdup)) return 0;