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

修改初始化时没有role的bug

上级 f6779f86
......@@ -84,6 +84,7 @@ public class UAACoreService {
userRoleService.selectByUserid(userId).forEach(sysUserRole -> roleIds.add(sysUserRole.getRoleid()));
roleIds.forEach(roleid->authorities.add(new SimpleGrantedAuthority("ROLE_"+roleid)));
if(roleIds.size()>0){
SysRolePermissionSearchContext context = new SysRolePermissionSearchContext();
context.getSelectCond().in("sys_roleid",roleIds).eq("permissionenable",1).orderByAsc("permissiontype","sys_permissionid");
context.setSize(Integer.MAX_VALUE);
......@@ -93,6 +94,8 @@ public class UAACoreService {
else
authorities.add(new SimpleGrantedAuthority(sysRolePermission.getPermissiontype()+"_"+sysRolePermission.getPermissionid()));
});
}
return authorities;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册