We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如果管理员修改了角色权限,然后该角色的用户仍在线的话,仍然有权限。 if (roleService.updateRole(role) > 0) { // 更新缓存用户权限 LoginUser loginUser = getLoginUser(); if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin()) { loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser())); loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName())); tokenService.setLoginUser(loginUser); } return AjaxResult.success(); } 这段代码可以看到,如果该用户不是管理员,则更新缓存。 问题是没有更新其他用户,只要该用户仍在线,就仍然拥有权限。 (大改若依时,测试权限模块发现)
if (roleService.updateRole(role) > 0) { // 更新缓存用户权限 LoginUser loginUser = getLoginUser(); if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin()) { loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser())); loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName())); tokenService.setLoginUser(loginUser); } return AjaxResult.success(); }
The text was updated successfully, but these errors were encountered:
请在 https://gitee.com/y_project/RuoYi-Vue/issues 里提问,方便统一处理。
Sorry, something went wrong.
No branches or pull requests
如果管理员修改了角色权限,然后该角色的用户仍在线的话,仍然有权限。
if (roleService.updateRole(role) > 0) { // 更新缓存用户权限 LoginUser loginUser = getLoginUser(); if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin()) { loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser())); loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName())); tokenService.setLoginUser(loginUser); } return AjaxResult.success(); }
这段代码可以看到,如果该用户不是管理员,则更新缓存。
问题是没有更新其他用户,只要该用户仍在线,就仍然拥有权限。
(大改若依时,测试权限模块发现)
The text was updated successfully, but these errors were encountered: