修改个人信息,密码后redis中登录信息不会过期问题

master
RuoYi 5 years ago
parent 09a3a971ff
commit 166d5ec55f
  1. 8
      ruoyi/src/main/java/com/ruoyi/framework/security/service/SysPermissionService.java
  2. 3
      ruoyi/src/main/java/com/ruoyi/framework/security/service/TokenService.java

@ -51,16 +51,16 @@ public class SysPermissionService
*/
public Set<String> getMenuPermission(SysUser user)
{
Set<String> roles = new HashSet<String>();
Set<String> perms = new HashSet<String>();
// 管理员拥有所有权限
if (user.isAdmin())
{
roles.add("*:*:*");
perms.add("*:*:*");
}
else
{
roles.addAll(menuService.selectMenuPermsByUserId(user.getUserId()));
perms.addAll(menuService.selectMenuPermsByUserId(user.getUserId()));
}
return roles;
return perms;
}
}

@ -77,8 +77,7 @@ public class TokenService
{
if (StringUtils.isNotNull(loginUser) && StringUtils.isNotEmpty(loginUser.getToken()))
{
String userKey = getTokenKey(loginUser.getToken());
redisCache.setCacheObject(userKey, loginUser);
refreshToken(loginUser);
}
}

Loading…
Cancel
Save