weizhouapache commented on code in PR #14870:
URL: https://github.com/apache/cloudstack/pull/14870#discussion_r4717903696
##########
server/src/main/java/org/apache/cloudstack/acl/ProjectRoleManagerImpl.java:
##########
@@ -90,6 +90,22 @@ private void checkAccess(Long projectId) {
throw new PermissionDeniedException("Dynamic api checker is not
enabled, aborting role operation");
}
+ ProjectAccount projectAccount = checkProjectMembership(project);
+ if (projectAccount != null && ProjectAccount.Role.Admin !=
projectAccount.getAccountRole()) {
+ throw new PermissionDeniedException("User unauthorized to perform
operation in the project");
+ }
Review Comment:
can you add javadoc to checkAccess, or rename it ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]