From 2f74eb9c427894d3d2b0e720d96ec40a09190e43 Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Mon, 15 Dec 2025 16:46:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/admin/hooks/ApiAuthHook.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/agent/admin/hooks/ApiAuthHook.php b/agent/admin/hooks/ApiAuthHook.php index c11a6023..2a8b867a 100644 --- a/agent/admin/hooks/ApiAuthHook.php +++ b/agent/admin/hooks/ApiAuthHook.php @@ -85,6 +85,7 @@ class ApiAuthHook private function set_session($userId) { + $uri_string = uri_string(); $_SESSION['userId'] = intval($userId); $this->CI->load->model('agent/admin/Market_sys_admin_model'); $re_admin = $this->CI->Market_sys_admin_model->get(['userId' => $userId, 'status' => 0]); @@ -119,7 +120,7 @@ class ApiAuthHook } } } - if ($authority_set) { + if ($authority_set && !in_array($uri_string, $this->route_un)) { $show = true; $authority = $authorityAry[1] . ':' . $authorityAry[2] . ':' . $authority_set;//system:user:save if ($menuIds) { @@ -153,6 +154,7 @@ class ApiAuthHook private function set_session_pingan($userId) { + $uri_string = uri_string(); $_SESSION['userId'] = intval($userId); $this->CI->load->model('agent/pingan/Pingan_users_model'); $re_admin = $this->CI->Pingan_users_model->get(['id' => $userId, 'status' => 1]); @@ -187,7 +189,7 @@ class ApiAuthHook } } } - if ($authority_set) { + if ($authority_set && !in_array($uri_string, $this->route_un)) { $show = true; $authority = $authorityAry[1] . ':' . $authorityAry[2] . ':' . $authority_set;//system:user:save if ($menuIds) {