fix: 在线用户根据角色数据权限范围隔离
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user