提交 daff8bba 编写于 作者: sq3536's avatar sq3536

superuser 逻辑bug

上级 54fc675e
......@@ -134,6 +134,10 @@ public class LdapUserService extends SysUserServiceImpl implements Authenticatio
public AuthenticationUser createUserDetails(SysUser user) {
AuthenticationUser userdatail = new AuthenticationUser();
CachedBeanCopier.copy(user, userdatail);
if(user.getSuperuser()!=null)
userdatail.setSuperuser(user.getSuperuser());
else
userdatail.setSuperuser(0);
if (userdatail.getSuperuser() == 1) {
userdatail.setAuthorities(AuthorityUtils.createAuthorityList("ROLE_SUPERADMIN"));
}
......
......@@ -88,7 +88,10 @@ public class UAAUserService extends SysUserServiceImpl implements Authentication
public AuthenticationUser createUserDetails(SysUser user) {
AuthenticationUser userdatail = new AuthenticationUser();
CachedBeanCopier.copy(user,userdatail);
userdatail.setSuperuser(user.getSuperuser());
if(user.getSuperuser()!=null)
userdatail.setSuperuser(user.getSuperuser());
else
userdatail.setSuperuser(0);
if(userdatail.getSuperuser()==1){
userdatail.setAuthorities(AuthorityUtils.createAuthorityList("ROLE_SUPERADMIN"));
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册