diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java index eb864badf41..8203db6f759 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. package org.apache.cloudstack.api.command.user.volume; +import org.apache.cloudstack.api.ACL; +import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.log4j.Logger; @@ -60,6 +62,7 @@ public class AttachVolumeCmd extends BaseAsyncCmd { required=true, description="the ID of the disk volume") private Long id; + @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType=UserVmResponse.class, required=true, description=" the ID of the virtual machine") private Long virtualMachineId; diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java index 73cc82791d3..8061ac51806 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. package org.apache.cloudstack.api.command.user.volume; +import org.apache.cloudstack.api.ACL; +import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; @@ -41,6 +43,7 @@ public class DeleteVolumeCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// + @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class, required=true, description="The ID of the disk volume") private Long id; diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java index fc68fe13f5b..f02037f5616 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. package org.apache.cloudstack.api.command.user.volume; +import org.apache.cloudstack.api.ACL; +import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.log4j.Logger; @@ -44,6 +46,7 @@ public class DetachVolumeCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// + @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class, description="the ID of the disk volume") private Long id; diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java index 08116fc4e6e..336e51b93df 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. package org.apache.cloudstack.api.command.user.volume; +import org.apache.cloudstack.api.ACL; +import org.apache.cloudstack.acl.SecurityChecker.AccessType; import java.net.URISyntaxException; @@ -48,6 +50,7 @@ public class ExtractVolumeCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// + @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class, required=true, description="the ID of the volume") private Long id; diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java index 900cd7554d9..e012b367df3 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. package org.apache.cloudstack.api.command.user.volume; +import org.apache.cloudstack.api.ACL; +import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.log4j.Logger; @@ -49,6 +51,7 @@ public class ListVolumesCmd extends BaseListTaggedResourcesCmd { description="list volumes on specified host") private Long hostId; + @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class, description="the ID of the disk volume") private Long id; diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java index 85bf4332be1..c9ab4d058b0 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. package org.apache.cloudstack.api.command.user.volume; +import org.apache.cloudstack.api.ACL; +import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.log4j.Logger; @@ -49,6 +51,7 @@ public class ResizeVolumeCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// + @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, entityType=VolumeResponse.class, type=CommandType.UUID, description="the ID of the disk volume") private Long id; diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java index 859ad8a8459..829d3692c23 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. package org.apache.cloudstack.api.command.user.volume; +import org.apache.cloudstack.api.ACL; +import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.log4j.Logger; @@ -43,6 +45,7 @@ public class UpdateVolumeCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// + @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class, description="the ID of the disk volume") private Long id;