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) {