lyhzzz 2 năm trước cách đây
mục cha
commit
096197fbce

+ 2 - 1
src/main/java/com/fdkankan/ucenter/interceptor/AppInterceptor.java

@@ -42,11 +42,12 @@ public class AppInterceptor implements HandlerInterceptor {
 			String redisKey = RedisKeyUtil.PREFIX_CACHE_CAMERA + username;
 			if(redisUtil.hasKey(redisKey)){
 				String tokenU = redisUtil.get(redisKey);
+				String redisKey2 =  String.format(RedisKey.TOKEN_V3 , token );
 				if(!tokenU.equals(token)){
+					redisUtil.del(redisKey2);
 					return false;
 				}
 				redisUtil.expire(redisKey,21800L);
-				String redisKey2 =  String.format(RedisKey.TOKEN_V3 , token );
 				if(redisUtil.hasKey(redisKey2)){
 					redisUtil.expire(redisKey2,21800L);
 				}else {

+ 1 - 1
src/main/java/com/fdkankan/ucenter/service/impl/AppSceneService.java

@@ -93,7 +93,7 @@ public class AppSceneService {
             }
             param.setUserId(user.getId());
             SysRole role = userRoleService.getByUserId(user.getId());
-            if(role != null && "super-admin".equals(role.getRoleType())){
+            if(role != null && "admin".contains(role.getRoleType())){
                 canDelBut = true;
             }
         }