From e51d472b0cfda56db91fc82728c6bb29016e4d50 Mon Sep 17 00:00:00 2001 From: Alena Prokharchyk Date: Wed, 5 Feb 2014 15:28:34 -0800 Subject: [PATCH] External UUID control: as only Root admin can change external UUID, so modified @Parameter to enforce the check --- api/src/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java | 3 ++- api/src/org/apache/cloudstack/api/BaseCustomIdCmd.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/api/src/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java b/api/src/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java index dfb9439b0b4..b251c6ef2ec 100644 --- a/api/src/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java @@ -16,11 +16,12 @@ // under the License. package org.apache.cloudstack.api; +import org.apache.cloudstack.acl.RoleType; public abstract class BaseAsyncCustomIdCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.CUSTOM_ID, type = CommandType.STRING, - description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4") + description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin}) private String customId; public String getCustomId() { diff --git a/api/src/org/apache/cloudstack/api/BaseCustomIdCmd.java b/api/src/org/apache/cloudstack/api/BaseCustomIdCmd.java index 942f29f5664..7ca9f1efe7e 100644 --- a/api/src/org/apache/cloudstack/api/BaseCustomIdCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseCustomIdCmd.java @@ -16,11 +16,13 @@ // under the License. package org.apache.cloudstack.api; +import org.apache.cloudstack.acl.RoleType; + public abstract class BaseCustomIdCmd extends BaseCmd { @Parameter(name = ApiConstants.CUSTOM_ID, type = CommandType.STRING, - description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4") + description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin}) private String customId; public String getCustomId() {