Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cash-loan-flow-boss
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QG
cash-loan-flow-boss
Commits
5e8c4b3d
Commit
5e8c4b3d
authored
Dec 07, 2020
by
suntao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限校验
parent
23c20c85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
UserServiceImpl.java
...up/cashloanflowboss/api/user/service/UserServiceImpl.java
+1
-1
ApplicationSecurityHandler.java
...owboss/core/configuration/ApplicationSecurityHandler.java
+1
-2
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/user/service/UserServiceImpl.java
View file @
5e8c4b3d
...
...
@@ -291,7 +291,7 @@ public class UserServiceImpl implements UserService {
return
Result
.
buildFail
(
"不存在对应的角色"
);
}
Role
role
=
roleRepository
.
getOne
(
roleId
);
if
(!
exist
.
getRole
().
getId
().
equals
(
roleId
))
{
if
(
exist
.
getRole
()
==
null
||
!
exist
.
getRole
().
getId
().
equals
(
roleId
))
{
exist
.
setRole
(
role
);
}
if
(
roleId
==
1L
)
{
...
...
src/main/java/cn/quantgroup/cashloanflowboss/core/configuration/ApplicationSecurityHandler.java
View file @
5e8c4b3d
...
...
@@ -69,8 +69,7 @@ public class ApplicationSecurityHandler implements SecurityHandler {
boolean
hasPrivilege
=
principal
.
isSuperAdministrator
();
List
<
Role
>
roleList
=
getRoleAndParent
(
principal
.
getRoles
());
hasPrivilege
&=
CollectionUtils
.
isEmpty
(
roleList
);
hasPrivilege
&=
roleList
.
stream
().
anyMatch
(
roleItem
->
this
.
checkAuthority
(
authorityId
,
roleItem
));
hasPrivilege
|=
CollectionUtils
.
isNotEmpty
(
roleList
)
&&
roleList
.
stream
().
anyMatch
(
roleItem
->
this
.
checkAuthority
(
authorityId
,
roleItem
));
if
(
hasPrivilege
)
{
return
new
Tuple
<>(
Boolean
.
TRUE
,
null
);
}
else
{
...
...
Write
Preview
Markdown
is supported
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