Unverified Commit 64a3ff7b authored by xiaoyong's avatar xiaoyong Committed by GitHub
Browse files

Issues635 (#751)

* issues/635

* issues/635

Co-authored-by: asdc <asdc>
parent 20f2c636
......@@ -43,7 +43,7 @@ public class DataServiceImpl implements DataService {
private final DeptService deptService;
/**
* 用户角色改变时需清理缓存
* 用户角色和用户部门改变时需清理缓存
* @param user /
* @return /
*/
......
......@@ -119,6 +119,10 @@ public class UserServiceImpl implements UserService {
redisUtils.del(CacheKey.MENU_USER + resources.getId());
redisUtils.del(CacheKey.ROLE_AUTH + resources.getId());
}
// 修改部门会影响 数据权限
if (!Objects.equals(resources.getDept(),user.getDept())) {
redisUtils.del(CacheKey.DATA_USER + resources.getId());
}
// 如果用户被禁用,则清除用户登录信息
if(!resources.getEnabled()){
onlineUserService.kickOutForUsername(resources.getUsername());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment