提交 6ac16611 编写于 作者: xignzi006's avatar xignzi006 🇨🇳

更新businesscentral-util/src/main/java/cn/ibizlab/businesscentral/util/service/IBZUAAUserService.java

上级 4506845d
...@@ -9,6 +9,7 @@ import cn.ibizlab.businesscentral.util.security.AuthorizationLogin; ...@@ -9,6 +9,7 @@ import cn.ibizlab.businesscentral.util.security.AuthorizationLogin;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
...@@ -28,6 +29,7 @@ public class IBZUAAUserService implements AuthenticationUserService{ ...@@ -28,6 +29,7 @@ public class IBZUAAUserService implements AuthenticationUserService{
public AuthenticationUser loadUserByUsername(String username) { public AuthenticationUser loadUserByUsername(String username) {
AuthenticationUser user=uaaFeignClient.loginByUsername(username); AuthenticationUser user=uaaFeignClient.loginByUsername(username);
user.setAuthorities(AuthorityUtils.createAuthorityList("ROLE_SUPERADMIN"));
if(user==null) if(user==null)
throw new BadRequestAlertException("登录失败","IBZUAAUser",username); throw new BadRequestAlertException("登录失败","IBZUAAUser",username);
return user; return user;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册