fix: 权限问题

This commit is contained in:
TS-QD1 2025-04-07 10:16:19 +08:00
parent c4a4d6374d
commit 8b3302f518

View File

@ -66,12 +66,12 @@ public class SystemUserRouteController extends DefaultBaseController {
if (roleSimpleDTOList == null || roleSimpleDTOList.isEmpty()) {
throw new SaveException("角色不存在");
}
boolean isAdmin = roleSimpleDTOList.stream().anyMatch(roleSimpleDTO -> StringUtils.equals("运营平台", roleSimpleDTO.getRoleName()) ||
StringUtils.equals("项目运营", roleSimpleDTO.getRoleName()) ||
StringUtils.equals("开发人员", roleSimpleDTO.getRoleName()));
boolean isAdmin = roleSimpleDTOList.stream().anyMatch(roleSimpleDTO -> StringUtils.contains("运营平台", roleSimpleDTO.getRoleName()) ||
StringUtils.contains("项目运营", roleSimpleDTO.getRoleName()) ||
StringUtils.contains("开发人员", roleSimpleDTO.getRoleName()));
if (isAdmin || userInfoBO.getUserId().equals("1")) {
return new ModelAndView("forward:/default-main");
} else if (roleSimpleDTOList.stream().anyMatch(roleSimpleDTO -> StringUtils.equals("普通用户", roleSimpleDTO.getRoleName()))) {
} else if (roleSimpleDTOList.stream().anyMatch(roleSimpleDTO -> StringUtils.contains("普通用户", roleSimpleDTO.getRoleName()))) {
return new ModelAndView(new RedirectView(ProjectConfigUtil.getText("AiServerUrl")));
}
return new ModelAndView("systemuser/login?error=无权限访问");