From d82721f5fa68f8d5f1a88a2a4b12cf6310ec587c Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 8 Jul 2024 11:40:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=A8=E7=BA=BF=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=A7=92=E8=89=B2=E6=95=B0=E6=8D=AE=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=8C=83=E5=9B=B4=E9=9A=94=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/monitor/controller/sys_user_online.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/monitor/controller/sys_user_online.go b/src/modules/monitor/controller/sys_user_online.go index fb279d14..1212b7eb 100644 --- a/src/modules/monitor/controller/sys_user_online.go +++ b/src/modules/monitor/controller/sys_user_online.go @@ -67,7 +67,7 @@ func (s *SysUserOnlineController) List(c *gin.Context) { if currentRoleDataScope == roledatascope.DEPT && loginUser.DeptID == currentUser.DeptID { return true } - if currentRoleDataScope == roledatascope.DEPT_AND_CHILD && strings.Contains(loginUser.User.Dept.Ancestors, currentUser.DeptID) { + if currentRoleDataScope == roledatascope.DEPT_AND_CHILD && (strings.Contains(loginUser.User.Dept.Ancestors, currentUser.DeptID) || currentUser.DeptID == loginUser.DeptID) { return true } if currentRoleDataScope == roledatascope.SELF && loginUser.UserID == currentUser.UserID {