mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	CLOUDSTACK-2487: Show error while adding acl_item to default ACL
This commit is contained in:
		
							parent
							
								
									b66c484905
								
							
						
					
					
						commit
						2dc076f232
					
				| @ -216,8 +216,8 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ | ||||
|             throw new InvalidParameterValueException("Network ACL can be created just for networks of type " + Networks.TrafficType.Guest); | ||||
|         } | ||||
| 
 | ||||
|         if(aclId != NetworkACL.DEFAULT_DENY) { | ||||
|             //ACL is not default DENY | ||||
|         if(aclId != NetworkACL.DEFAULT_DENY && aclId != NetworkACL.DEFAULT_ALLOW) { | ||||
|             //ACL is not default DENY/ALLOW | ||||
|             // ACL should be associated with a VPC | ||||
|             Vpc vpc = _vpcMgr.getVpc(acl.getVpcId()); | ||||
|             if(vpc == null){ | ||||
| @ -254,6 +254,10 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ | ||||
|             throw new InvalidParameterValueException("Unable to find specified ACL"); | ||||
|         } | ||||
| 
 | ||||
|         if((aclId == NetworkACL.DEFAULT_DENY) || (aclId == NetworkACL.DEFAULT_ALLOW)){ | ||||
|             throw new InvalidParameterValueException("Default ACL cannot be modified"); | ||||
|         } | ||||
| 
 | ||||
|         Vpc vpc = _vpcMgr.getVpc(acl.getVpcId()); | ||||
|         if(vpc == null){ | ||||
|             throw new InvalidParameterValueException("Unable to find Vpc associated with the NetworkACL"); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user