Commit 6c33602f authored by macro's avatar macro
Browse files

获取用户资源逻辑修改

parent 0d416f29
...@@ -27,9 +27,9 @@ public class AdminUserDetails implements UserDetails { ...@@ -27,9 +27,9 @@ public class AdminUserDetails implements UserDetails {
@Override @Override
public Collection<? extends GrantedAuthority> getAuthorities() { public Collection<? extends GrantedAuthority> getAuthorities() {
//返回当前用户的角色 //返回当前用户所拥有的资源
return resourceList.stream() return resourceList.stream()
.map(role ->new SimpleGrantedAuthority(role.getId()+":"+role.getName())) .map(resource ->new SimpleGrantedAuthority(resource.getId()+":"+resource.getName()))
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment