cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject [2/2] git commit: updated refs/heads/rbac to af14699
Date Fri, 24 Jan 2014 02:18:24 GMT
fixing the build _ AffinityGroup command changes


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/af14699c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/af14699c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/af14699c

Branch: refs/heads/rbac
Commit: af14699c4c8b742efbba9a80f43cd9d9f32bb559
Parents: 96a64b9
Author: Prachi Damle <prachi@cloud.com>
Authored: Thu Jan 23 18:17:43 2014 -0800
Committer: Prachi Damle <prachi@cloud.com>
Committed: Thu Jan 23 18:17:43 2014 -0800

----------------------------------------------------------------------
 .../command/user/affinitygroup/CreateAffinityGroupCmd.java    | 3 ++-
 .../command/user/affinitygroup/DeleteAffinityGroupCmd.java    | 3 ++-
 .../api/command/user/affinitygroup/ListAffinityGroupsCmd.java | 3 ++-
 .../network/contrail/management/MockAccountManager.java       | 7 +++++++
 server/test/com/cloud/user/MockAccountManagerImpl.java        | 7 +++++++
 .../apache/cloudstack/acl/RoleBasedEntityAccessChecker.java   | 1 -
 .../src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java  | 2 +-
 7 files changed, 21 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/af14699c/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
index a3f3c09..a79e9fd 100644
--- a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
@@ -18,6 +18,7 @@ package org.apache.cloudstack.api.command.user.affinitygroup;
 
 import org.apache.log4j.Logger;
 
+import org.apache.cloudstack.acl.AclEntityType;
 import org.apache.cloudstack.affinity.AffinityGroup;
 import org.apache.cloudstack.affinity.AffinityGroupResponse;
 import org.apache.cloudstack.api.APICommand;
@@ -34,7 +35,7 @@ import com.cloud.event.EventTypes;
 import com.cloud.exception.ResourceAllocationException;
 import com.cloud.user.Account;
 
-@APICommand(name = "createAffinityGroup", responseObject = AffinityGroupResponse.class, description
= "Creates an affinity/anti-affinity group")
+@APICommand(name = "createAffinityGroup", responseObject = AffinityGroupResponse.class, description
= "Creates an affinity/anti-affinity group", entityType = { AclEntityType.AffinityGroup })
 public class CreateAffinityGroupCmd extends BaseAsyncCreateCmd {
     public static final Logger s_logger = Logger.getLogger(CreateAffinityGroupCmd.class.getName());
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/af14699c/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
index 74b207a..0bbe247 100644
--- a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
@@ -18,6 +18,7 @@ package org.apache.cloudstack.api.command.user.affinitygroup;
 
 import org.apache.log4j.Logger;
 
+import org.apache.cloudstack.acl.AclEntityType;
 import org.apache.cloudstack.affinity.AffinityGroupResponse;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiCommandJobType;
@@ -34,7 +35,7 @@ import com.cloud.event.EventTypes;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.user.Account;
 
-@APICommand(name = "deleteAffinityGroup", description = "Deletes affinity group", responseObject
= SuccessResponse.class)
+@APICommand(name = "deleteAffinityGroup", description = "Deletes affinity group", responseObject
= SuccessResponse.class, entityType = { AclEntityType.AffinityGroup })
 public class DeleteAffinityGroupCmd extends BaseAsyncCmd {
     public static final Logger s_logger = Logger.getLogger(DeleteAffinityGroupCmd.class.getName());
     private static final String s_name = "deleteaffinitygroupresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/af14699c/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
index 0761a64..262ecc7 100644
--- a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.user.affinitygroup;
 
 import org.apache.log4j.Logger;
+import org.apache.cloudstack.acl.AclEntityType;
 import org.apache.cloudstack.affinity.AffinityGroupResponse;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiCommandJobType;
@@ -26,7 +27,7 @@ import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.response.ListResponse;
 import org.apache.cloudstack.api.response.UserVmResponse;
 
-@APICommand(name = "listAffinityGroups", description = "Lists affinity groups", responseObject
= AffinityGroupResponse.class)
+@APICommand(name = "listAffinityGroups", description = "Lists affinity groups", responseObject
= AffinityGroupResponse.class, entityType = { AclEntityType.AffinityGroup })
 public class ListAffinityGroupsCmd extends BaseListAccountResourcesCmd {
     public static final Logger s_logger = Logger.getLogger(ListAffinityGroupsCmd.class.getName());
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/af14699c/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
index 04cdc7c..67dd406 100644
--- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
+++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
@@ -372,4 +372,11 @@ public class MockAccountManager extends ManagerBase implements AccountManager
{
 
     }
 
+    @Override
+    public void checkAccess(Account account, AccessType accessType, boolean sameOwner, String
apiName,
+            ControlledEntity... entities) throws PermissionDeniedException {
+        // TODO Auto-generated method stub
+
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/af14699c/server/test/com/cloud/user/MockAccountManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/user/MockAccountManagerImpl.java b/server/test/com/cloud/user/MockAccountManagerImpl.java
index f0986aa..fa786bf 100644
--- a/server/test/com/cloud/user/MockAccountManagerImpl.java
+++ b/server/test/com/cloud/user/MockAccountManagerImpl.java
@@ -344,4 +344,11 @@ public class MockAccountManagerImpl extends ManagerBase implements Manager,
Acco
         return null;
     }
 
+    @Override
+    public void checkAccess(Account account, AccessType accessType, boolean sameOwner, String
apiName,
+            ControlledEntity... entities) throws PermissionDeniedException {
+        // TODO Auto-generated method stub
+
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/af14699c/services/iam/plugin/src/org/apache/cloudstack/acl/RoleBasedEntityAccessChecker.java
----------------------------------------------------------------------
diff --git a/services/iam/plugin/src/org/apache/cloudstack/acl/RoleBasedEntityAccessChecker.java
b/services/iam/plugin/src/org/apache/cloudstack/acl/RoleBasedEntityAccessChecker.java
index 4802456..acbf8d3 100644
--- a/services/iam/plugin/src/org/apache/cloudstack/acl/RoleBasedEntityAccessChecker.java
+++ b/services/iam/plugin/src/org/apache/cloudstack/acl/RoleBasedEntityAccessChecker.java
@@ -154,7 +154,6 @@ public class RoleBasedEntityAccessChecker extends DomainChecker implements
Secur
                 }
             }
         }
-        
         return false;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/af14699c/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java
b/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java
index d3be747..7651548 100644
--- a/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java
+++ b/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java
@@ -241,7 +241,7 @@ public class AclApiServiceImpl extends ManagerBase implements AclApiService,
Man
         List<AclPolicy> policies = _iamSrv.listAclPolicies(accountId);
         AclPolicyPermission curPerm = null;
         for (AclPolicy policy : policies) {
-            List<AclPolicyPermission> perms = _iamSrv.listPolicyPermissionByEntityType(policy.getId(),
action,
+            List<AclPolicyPermission> perms = _iamSrv.listPolicyPermissionByActionAndEntity(policy.getId(),
action,
                     entityType);
             if (perms == null || perms.size() == 0)
                 continue;


Mime
View raw message