CLOUDSTACK-2553: Made ACL item action case-insensitive

This commit is contained in:
Kishan Kavala 2013-05-20 17:58:14 +05:30
parent 32e7ba23a3
commit 612afbd179
1 changed files with 1 additions and 3 deletions

View File

@ -342,9 +342,7 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ
//Check ofr valid action Allow/Deny
if(action != null){
try {
NetworkACLItem.Action.valueOf(action);
} catch (IllegalArgumentException ex) {
if(!("Allow".equalsIgnoreCase(action) || "Deny".equalsIgnoreCase(action))){
throw new InvalidParameterValueException("Invalid action. Allowed actions are Allow and Deny");
}
}