Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
64a3ff7b
Unverified
Commit
64a3ff7b
authored
Jul 03, 2022
by
xiaoyong
Committed by
GitHub
Jul 03, 2022
Browse files
Issues635 (#751)
* issues/635 * issues/635 Co-authored-by: asdc <asdc>
parent
20f2c636
Changes
2
Hide whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DataServiceImpl.java
View file @
64a3ff7b
...
...
@@ -43,7 +43,7 @@ public class DataServiceImpl implements DataService {
private
final
DeptService
deptService
;
/**
* 用户角色改变时需清理缓存
* 用户角色
和用户部门
改变时需清理缓存
* @param user /
* @return /
*/
...
...
eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java
View file @
64a3ff7b
...
...
@@ -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
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment