mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 11513: another customer hits the same issue by associate ip in the basic zone
Reviewed-by: alena@citrix.com
This commit is contained in:
parent
211c7099a6
commit
ee59c26e93
@ -552,7 +552,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
if (ipOwner == null) {
|
||||
throw new InvalidParameterValueException("Unable to find account " + accountName + " in domain " + domainId + ", permission denied");
|
||||
}
|
||||
|
||||
|
||||
_accountMgr.checkAccess(caller, null, ipOwner);
|
||||
|
||||
DataCenterVO zone = null;
|
||||
@ -561,6 +561,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
if (zone == null) {
|
||||
throw new InvalidParameterValueException("Can't find zone by id " + zoneId);
|
||||
}
|
||||
|
||||
if (zone.getNetworkType() == NetworkType.Basic) {
|
||||
throw new InvalidParameterValueException("Can't associate ip in basic zone");
|
||||
}
|
||||
|
||||
if (Grouping.AllocationState.Disabled == zone.getAllocationState() && !_accountMgr.isRootAdmin(caller.getType())) {
|
||||
throw new PermissionDeniedException("Cannot perform this operation, Zone is currently disabled: " + zoneId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user