You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2014/01/03 19:51:42 UTC
[2/2] git commit: updated refs/heads/rbac to 04a0d12
Adding @ACL annotation to Volume commands
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/04a0d12a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/04a0d12a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/04a0d12a
Branch: refs/heads/rbac
Commit: 04a0d12a68d705d271ab0f200e45300ad5e8c751
Parents: e5b4a1d
Author: Prachi Damle <pr...@cloud.com>
Authored: Thu Jan 2 18:37:26 2014 -0800
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Jan 2 18:39:20 2014 -0800
----------------------------------------------------------------------
.../cloudstack/api/command/user/volume/AttachVolumeCmd.java | 3 +++
.../cloudstack/api/command/user/volume/DeleteVolumeCmd.java | 3 +++
.../cloudstack/api/command/user/volume/DetachVolumeCmd.java | 3 +++
.../cloudstack/api/command/user/volume/ExtractVolumeCmd.java | 3 +++
.../apache/cloudstack/api/command/user/volume/ListVolumesCmd.java | 3 +++
.../cloudstack/api/command/user/volume/ResizeVolumeCmd.java | 3 +++
.../cloudstack/api/command/user/volume/UpdateVolumeCmd.java | 3 +++
7 files changed, 21 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a0d12a/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java
----------------------------------------------------------------------
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 eb864ba..8203db6 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;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a0d12a/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java
----------------------------------------------------------------------
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 73cc827..8061ac5 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;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a0d12a/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java
----------------------------------------------------------------------
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 fc68fe1..f02037f 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;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a0d12a/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java
----------------------------------------------------------------------
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 08116fc..336e51b 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;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a0d12a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java
----------------------------------------------------------------------
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 900cd75..e012b36 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;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a0d12a/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java
----------------------------------------------------------------------
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 85bf433..c9ab4d0 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;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a0d12a/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
----------------------------------------------------------------------
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 859ad8a..829d369 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;