You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "bernardodemarco (via GitHub)" <gi...@apache.org> on 2026/01/08 18:56:34 UTC
Re: [PR] Fixed User type accounts being able to change resource limits of their own domain and account [cloudstack]
bernardodemarco commented on code in PR #12046:
URL: https://github.com/apache/cloudstack/pull/12046#discussion_r2673507899
##########
server/src/main/java/com/cloud/resourcelimit/ResourceLimitManagerImpl.java:
##########
@@ -903,6 +903,11 @@ protected void addTaggedResourceLimits(List<ResourceLimitVO> limits, ResourceTyp
public ResourceLimitVO updateResourceLimit(Long accountId, Long domainId, Integer typeId, Long max, String tag) {
Account caller = CallContext.current().getCallingAccount();
+ if (caller.getType().equals(Account.Type.NORMAL)) {
+ logger.info("Throwing exception because only root admins and domain admins are allowed to update resource limits.");
+ throw new PermissionDeniedException("Your account does not have the right access level to update resource limits.");
Review Comment:
@erikbocks, could you check Lucas's suggestion here, please?
--
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