This is an automated email from the ASF dual-hosted git repository.
harikrishna pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 4cdcde2fe7a server: do not return extension path to non root admins
(#11856)
4cdcde2fe7a is described below
commit 4cdcde2fe7aca1492db00ba8011e5c746c174ab5
Author: Abhishek Kumar <[email protected]>
AuthorDate: Fri Oct 17 15:06:28 2025 +0530
server: do not return extension path to non root admins (#11856)
Signed-off-by: Abhishek Kumar <[email protected]>
---
server/src/main/java/com/cloud/server/ManagementServerImpl.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/server/src/main/java/com/cloud/server/ManagementServerImpl.java
b/server/src/main/java/com/cloud/server/ManagementServerImpl.java
index e7b16a22ad1..3f811c152f0 100644
--- a/server/src/main/java/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/main/java/com/cloud/server/ManagementServerImpl.java
@@ -4672,7 +4672,8 @@ public class ManagementServerImpl extends ManagerBase
implements ManagementServe
final Map<String, Object> capabilities = new HashMap<>();
final Account caller = getCaller();
- final boolean isCallerAdmin = _accountService.isAdmin(caller.getId());
+ final boolean isCallerRootAdmin =
_accountService.isRootAdmin(caller.getId());
+ final boolean isCallerAdmin = isCallerRootAdmin ||
_accountService.isAdmin(caller.getId());
boolean securityGroupsEnabled = false;
boolean elasticLoadBalancerEnabled;
String supportELB = "false";
@@ -4753,7 +4754,7 @@ public class ManagementServerImpl extends ManagerBase
implements ManagementServe
}
capabilities.put(ApiConstants.SHAREDFSVM_MIN_CPU_COUNT, fsVmMinCpu);
capabilities.put(ApiConstants.SHAREDFSVM_MIN_RAM_SIZE, fsVmMinRam);
- if (isCallerAdmin) {
+ if (isCallerRootAdmin) {
capabilities.put(ApiConstants.EXTENSIONS_PATH,
extensionsManager.getExtensionsPath());
}
capabilities.put(ApiConstants.ADDITONAL_CONFIG_ENABLED,
UserVmManager.EnableAdditionalVmConfig.valueIn(caller.getId()));