diff --git a/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java b/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java index f6aa1dcd849..3ff55fd8a03 100644 --- a/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java +++ b/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java @@ -38,10 +38,11 @@ public class ListCapabilitiesCmd extends BaseCmd { @Override public void execute(){ - Map capabilities = _mgr.listCapabilities(this); + Map capabilities = _mgr.listCapabilities(this); CapabilitiesResponse response = new CapabilitiesResponse(); - response.setSecurityGroupsEnabled(capabilities.get("securityGroupsEnabled")); - response.setCloudStackVersion(capabilities.get("cloudStackVersion")); + response.setSecurityGroupsEnabled((Boolean)capabilities.get("securityGroupsEnabled")); + response.setCloudStackVersion((String)capabilities.get("cloudStackVersion")); + response.setUserPublicTemplateEnabled((Boolean)capabilities.get("userPublicTemplateEnabled")); response.setObjectName("capability"); response.setResponseName(getCommandName()); this.setResponseObject(response); diff --git a/api/src/com/cloud/api/response/CapabilitiesResponse.java b/api/src/com/cloud/api/response/CapabilitiesResponse.java index 3b025abfdf8..23973d5c93d 100644 --- a/api/src/com/cloud/api/response/CapabilitiesResponse.java +++ b/api/src/com/cloud/api/response/CapabilitiesResponse.java @@ -5,16 +5,19 @@ import com.google.gson.annotations.SerializedName; public class CapabilitiesResponse extends BaseResponse { @SerializedName("securitygroupsenabled") @Param(description="true if security groups support is enabled, false otherwise") - private String securityGroupsEnabled; + private boolean securityGroupsEnabled; @SerializedName("cloudstackversion") @Param(description="version of the cloud stack") private String cloudStackVersion; + + @SerializedName("userpublictemplateenabled") @Param(description="true if user and domain admins can set templates to be shared, false otherwise") + private boolean userPublicTemplateEnabled; - public String getSecurityGroupsEnabled() { + public boolean getSecurityGroupsEnabled() { return securityGroupsEnabled; } - public void setSecurityGroupsEnabled(String securityGroupsEnabled) { + public void setSecurityGroupsEnabled(boolean securityGroupsEnabled) { this.securityGroupsEnabled = securityGroupsEnabled; } @@ -25,4 +28,12 @@ public class CapabilitiesResponse extends BaseResponse { public void setCloudStackVersion(String cloudStackVersion) { this.cloudStackVersion = cloudStackVersion; } + + public boolean getUserPublicTemplateEnabled() { + return securityGroupsEnabled; + } + + public void setUserPublicTemplateEnabled(boolean userPublicTemplateEnabled) { + this.userPublicTemplateEnabled = userPublicTemplateEnabled; + } } diff --git a/api/src/com/cloud/server/ManagementService.java b/api/src/com/cloud/server/ManagementService.java index 3b5f929e48e..20bbe2d5277 100644 --- a/api/src/com/cloud/server/ManagementService.java +++ b/api/src/com/cloud/server/ManagementService.java @@ -352,7 +352,7 @@ public interface ManagementService { List searchForVmGroups(ListVMGroupsCmd cmd); - Map listCapabilities(ListCapabilitiesCmd cmd); + Map listCapabilities(ListCapabilitiesCmd cmd); /** * Extracts the volume to a particular location. diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 102d48e084b..60c0fb54fed 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -4148,15 +4148,14 @@ public class ManagementServerImpl implements ManagementServer { } @Override - public Map listCapabilities(ListCapabilitiesCmd cmd) { - Map capabilities = new HashMap(); + public Map listCapabilities(ListCapabilitiesCmd cmd) { + Map capabilities = new HashMap(); - String securityGroupsEnabled = _configs.get("direct.attach.security.groups.enabled"); - if(securityGroupsEnabled == null) { - securityGroupsEnabled = "false"; - } + String securityGroupsEnabled = _configs.get(Config.DirectAttachSecurityGroupsEnabled.key()); + String userPublicTemplateEnabled = _configs.get(Config.AllowPublicUserTemplates.key()); - capabilities.put("securityGroupsEnabled", securityGroupsEnabled); + capabilities.put("securityGroupsEnabled", (securityGroupsEnabled == null || securityGroupsEnabled.equals("false") ? false : true)); + capabilities.put("userPublicTemplateEnabled", (userPublicTemplateEnabled == null || userPublicTemplateEnabled.equals("false") ? false : true)); capabilities.put("cloudStackVersion", getVersion()); return capabilities; } diff --git a/ui/jsp/iso.jsp b/ui/jsp/iso.jsp index cfd8353539b..c7b4a5c9e4c 100644 --- a/ui/jsp/iso.jsp +++ b/ui/jsp/iso.jsp @@ -158,7 +158,7 @@ -
+
<%=t.t("crossZones")%>:
@@ -168,7 +168,7 @@
-
+
<%=t.t("OS.Type")%>:
@@ -180,7 +180,7 @@
-
+
<%=t.t("Account")%>:
@@ -190,7 +190,7 @@
-
+
<%=t.t("Domain")%>:
@@ -200,7 +200,7 @@
-
+
<%=t.t("Created")%>:
@@ -271,7 +271,7 @@ -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +