|
|
|
@ -76,7 +76,7 @@ public class TokenAuthenticationFilter extends OncePerRequestFilter {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 用户类型不匹配,无权限
|
|
|
|
// 用户类型不匹配,无权限
|
|
|
|
// 注意:只有 /admin-api/* 和 /app-api/* 有 userType,才需要比对用户类型
|
|
|
|
// 注意:只有 /admin-api/* 和 /app-api/* 有 userType,才需要比对用户类型
|
|
|
|
// TODO 芋艿:ws 要不要区分开?
|
|
|
|
// 类似 WebSocket 的 /ws/* 连接地址,是不需要比对用户类型的
|
|
|
|
if (userType != null
|
|
|
|
if (userType != null
|
|
|
|
&& ObjectUtil.notEqual(accessToken.getUserType(), userType)) {
|
|
|
|
&& ObjectUtil.notEqual(accessToken.getUserType(), userType)) {
|
|
|
|
throw new AccessDeniedException("错误的用户类型");
|
|
|
|
throw new AccessDeniedException("错误的用户类型");
|
|
|
|
|