You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "RodrigoDLopez (via GitHub)" <gi...@apache.org> on 2023/08/16 16:42:48 UTC
[GitHub] [cloudstack] RodrigoDLopez commented on a diff in pull request #7082: allow filtering of listDiskOffering and listServiceOffering APIs by account or project
RodrigoDLopez commented on code in PR #7082:
URL: https://github.com/apache/cloudstack/pull/7082#discussion_r1296177282
##########
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:
I'll check further and get back to you.
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org