Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apollo
Project overview
Project overview
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
apollo
Commits
bce744df
Unverified
Commit
bce744df
authored
Oct 01, 2019
by
Jason Song
Committed by
GitHub
Oct 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the potential permission issue with assigning app roles (#2629)
parent
d42331e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/PermissionValidator.java
...ramework/apollo/portal/component/PermissionValidator.java
+3
-1
apollo-portal/src/main/resources/static/app.html
apollo-portal/src/main/resources/static/app.html
+1
-1
No files found.
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/PermissionValidator.java
View file @
bce744df
...
@@ -137,6 +137,8 @@ public class PermissionValidator {
...
@@ -137,6 +137,8 @@ public class PermissionValidator {
public
boolean
hasManageAppMasterPermission
(
String
appId
)
{
public
boolean
hasManageAppMasterPermission
(
String
appId
)
{
// the manage app master permission might not be initialized, so we need to check isSuperAdmin first
// the manage app master permission might not be initialized, so we need to check isSuperAdmin first
return
isSuperAdmin
()
||
return
isSuperAdmin
()
||
systemRoleManagerService
.
hasManageAppMasterPermission
(
userInfoHolder
.
getUser
().
getUserId
(),
appId
);
(
hasAssignRolePermission
(
appId
)
&&
systemRoleManagerService
.
hasManageAppMasterPermission
(
userInfoHolder
.
getUser
().
getUserId
(),
appId
)
);
}
}
}
}
apollo-portal/src/main/resources/static/app.html
View file @
bce744df
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
应用负责人
</label>
应用负责人
</label>
<div
class=
"col-sm-6 J_ownerSelectorPanel"
>
<div
class=
"col-sm-6 J_ownerSelectorPanel"
>
<apollouserselector
apollo-id=
"'ownerSelector'"
disabled=
"isOpenManageAppMasterRoleLimit"
></apollouserselector>
<apollouserselector
apollo-id=
"'ownerSelector'"
disabled=
"isOpenManageAppMasterRoleLimit"
></apollouserselector>
<small
style=
"color: maroon"
ng-if=
"isOpenManageAppMasterRoleLimit"
>
(开启
应用管理员添加限
制后,应用负责人和项目管理员默认为本账号,不可选择)
</small>
<small
style=
"color: maroon"
ng-if=
"isOpenManageAppMasterRoleLimit"
>
(开启
项目管理员分配权限控
制后,应用负责人和项目管理员默认为本账号,不可选择)
</small>
</div>
</div>
</div>
</div>
...
...
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