Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
mall
Commits
6c33602f
Commit
6c33602f
authored
Oct 02, 2023
by
macro
Browse files
获取用户资源逻辑修改
parent
0d416f29
Changes
1
Hide whitespace changes
Inline
Side-by-side
mall-admin/src/main/java/com/macro/mall/bo/AdminUserDetails.java
View file @
6c33602f
...
...
@@ -27,9 +27,9 @@ public class AdminUserDetails implements UserDetails {
@Override
public
Collection
<?
extends
GrantedAuthority
>
getAuthorities
()
{
//返回当前用户
的角色
//返回当前用户
所拥有的资源
return
resourceList
.
stream
()
.
map
(
r
ol
e
->
new
SimpleGrantedAuthority
(
r
ol
e
.
getId
()+
":"
+
r
ol
e
.
getName
()))
.
map
(
r
esourc
e
->
new
SimpleGrantedAuthority
(
r
esourc
e
.
getId
()+
":"
+
r
esourc
e
.
getName
()))
.
collect
(
Collectors
.
toList
());
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment