weizhouapache commented on code in PR #7082:
URL: https://github.com/apache/cloudstack/pull/7082#discussion_r1296166728
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -3105,19 +3109,20 @@ private Pair<List<ServiceOfferingJoinVO>, Integer>
searchForServiceOfferingsInte
Integer cpuSpeed = cmd.getCpuSpeed();
Boolean encryptRoot = cmd.getEncryptRoot();
+ final Account owner = _accountMgr.finalizeOwner(caller, accountName,
domainId, projectId);
SearchCriteria<ServiceOfferingJoinVO> sc =
_srvOfferingJoinDao.createSearchCriteria();
- if (!_accountMgr.isRootAdmin(caller.getId()) && isSystem) {
- throw new InvalidParameterValueException("Only ROOT admins can
access system's offering");
+ if (!_accountMgr.isRootAdmin(owner.getId()) && isSystem) {
Review Comment:
@RodrigoDLopez
I did not look into it yet,
I think in some lines, we should use `caller` , not `owner`
--
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]