Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-auth
Commits
a2d5c291
Commit
a2d5c291
authored
May 07, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应用操作项权限修复
parent
3476e935
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+5
-2
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
a2d5c291
...
...
@@ -1120,6 +1120,8 @@ public class MenuApiServiceImpl implements MenuApiService {
authItemIdList
.
add
(
menu
.
getMenuId
());
}
}
//如果是gic菜单,需要去判断版本code
boolean
isNeedValidVersionCode
=
MenuProjectConstants
.
DEFAULT_PROJECT_CODE
==
projectCode
;
List
<
MenuDTO
>
resultList
=
new
ArrayList
<>();
Map
<
String
,
Object
>
operationItemMap
=
new
HashMap
<>(
16
);
...
...
@@ -1136,8 +1138,9 @@ public class MenuApiServiceImpl implements MenuApiService {
//当时超级管理员的时候,operationItemMap是没有值的,因此会一直有效。
if
(
CollectionUtils
.
isNotEmpty
(
operationItemListOfAuthItem
))
{
for
(
MenuDTO
menuDTO
:
operationItemListOfAuthItem
)
{
if
(!
operationItemMap
.
containsKey
(
menuDTO
.
getMenuId
().
toString
())
||
StringUtils
.
isBlank
(
versionCode
)
||
!
menuDTO
.
getMenuVersion
().
contains
(
"_"
+
versionCode
+
"_"
))
{
if
(!
operationItemMap
.
containsKey
(
menuDTO
.
getMenuId
().
toString
())
||
(
isNeedValidVersionCode
&&
StringUtils
.
isBlank
(
versionCode
))
||
(
isNeedValidVersionCode
&&
!
menuDTO
.
getMenuVersion
().
contains
(
"_"
+
versionCode
+
"_"
)))
{
//如果不存在,或者操作项的版本不对
//则是没有权限的操作项
resultList
.
add
(
menuDTO
);
...
...
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