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

superuser 逻辑bug

上级 daff8bba
......@@ -134,10 +134,7 @@ 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);
userdatail.setSuperuser(user.getSuperuser()==null?0:user.getSuperuser());
if (userdatail.getSuperuser() == 1) {
userdatail.setAuthorities(AuthorityUtils.createAuthorityList("ROLE_SUPERADMIN"));
}
......
......@@ -88,10 +88,7 @@ public class UAAUserService extends SysUserServiceImpl implements Authentication
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);
userdatail.setSuperuser(user.getSuperuser()==null?0:user.getSuperuser());
if(userdatail.getSuperuser()==1){
userdatail.setAuthorities(AuthorityUtils.createAuthorityList("ROLE_SUPERADMIN"));
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册