|
|
@@ -1,5 +1,6 @@
|
|
|
package nju.seec.helper.aspect.auth;
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.auth0.jwt.JWT;
|
|
|
import com.auth0.jwt.JWTVerifier;
|
|
|
import com.auth0.jwt.algorithms.Algorithm;
|
|
|
@@ -52,7 +53,7 @@ public class AuthAspect {
|
|
|
.stream(auth.roles())
|
|
|
.collect(Collectors.toSet())
|
|
|
.contains(user.getRole())) {
|
|
|
- throw HelperException.of(ExceptionType.FORBIDDEN, String.format("您暂时无法%s,请重新登录", auth.message()));
|
|
|
+ throw HelperException.of(ExceptionType.FORBIDDEN, StrUtil.format("您暂时无法{},请重新登录", auth.message()));
|
|
|
}
|
|
|
|
|
|
Object[] objects = joinPoint.getArgs();
|
|
|
@@ -97,7 +98,7 @@ public class AuthAspect {
|
|
|
|
|
|
user.setName(userInfo.name)
|
|
|
.setEmail(userInfo.email)
|
|
|
-// .setRole(userInfo.role)
|
|
|
+ .setRole(userInfo.role)
|
|
|
.setPhone(userInfo.phone)
|
|
|
.setPid(userInfo.id);
|
|
|
|