cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kis...@apache.org
Subject [2/2] git commit: updated refs/heads/master to 3a3fec3
Date Mon, 16 Dec 2013 12:41:32 GMT
CLOUDSTACK-5145 : Added permission checks while deleting network ACLs

Conflicts:
	server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java


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

Branch: refs/heads/master
Commit: 3a3fec3cb6bb4f9a008370ea02279d286654b01a
Parents: 7cac5aa
Author: Kishan Kavala <kishan@cloud.com>
Authored: Mon Dec 16 17:50:08 2013 +0530
Committer: Kishan Kavala <kishan@cloud.com>
Committed: Mon Dec 16 18:02:43 2013 +0530

----------------------------------------------------------------------
 .../com/cloud/network/vpc/NetworkACLServiceImpl.java   | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3a3fec3c/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
index fbcd461..f316999 100644
--- a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
+++ b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
@@ -579,8 +579,21 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ
     @Override
     public boolean revokeNetworkACLItem(long ruleId) {
         NetworkACLItemVO aclItem = _networkACLItemDao.findById(ruleId);
+<<<<<<< HEAD
         if (aclItem != null) {
             if ((aclItem.getAclId() == NetworkACL.DEFAULT_ALLOW) || (aclItem.getAclId() ==
NetworkACL.DEFAULT_DENY)) {
+=======
+        if(aclItem != null){
+            NetworkACL acl = _networkAclMgr.getNetworkACL(aclItem.getAclId());
+
+            Vpc vpc = _entityMgr.findById(Vpc.class, acl.getVpcId());
+
+            Account caller = CallContext.current().getCallingAccount();
+
+            _accountMgr.checkAccess(caller, null, true, vpc);
+
+            if((aclItem.getAclId() == NetworkACL.DEFAULT_ALLOW) || (aclItem.getAclId() ==
NetworkACL.DEFAULT_DENY)){
+>>>>>>> e2805b8... CLOUDSTACK-5145 : Added permission checks while deleting
network ACLs
                 throw new InvalidParameterValueException("ACL Items in default ACL cannot
be deleted");
             }
         }


Mime
View raw message