开启集群数据权限,同一浏览器不同账号登录看到其它账号集群信息bug fixed.

This commit is contained in:
许晓东
2024-06-16 20:36:00 +08:00
parent 30707e84a7
commit ecbd9dda6a
8 changed files with 44 additions and 1 deletions

View File

@@ -33,4 +33,9 @@ public class AuthController {
public ResponseData login(@RequestBody LoginUserDTO userDTO) {
return authService.login(userDTO);
}
@GetMapping("/own/data/auth")
public boolean ownDataAuthority() {
return authService.ownDataAuthority();
}
}

View File

@@ -10,4 +10,6 @@ import com.xuxd.kafka.console.beans.dto.LoginUserDTO;
public interface AuthService {
ResponseData login(LoginUserDTO userDTO);
boolean ownDataAuthority();
}

View File

@@ -93,4 +93,16 @@ public class AuthServiceImpl implements AuthService {
return ResponseData.create().data(loginResult).success();
}
@Override
public boolean ownDataAuthority() {
if (!authConfig.isEnable()) {
return true;
}
if (!authConfig.isEnableClusterAuthority()) {
return true;
}
return false;
}
}