mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2477: [GSLB] CloudStack currently allows admin to map LB rule
of one account to GSLB rule of a different account ensuring account id of GSLB rule and LB rule are same
This commit is contained in:
parent
2b93969823
commit
c8a0c40a2f
|
|
@ -204,6 +204,10 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
|
|||
|
||||
_accountMgr.checkAccess(caller, null, true, loadBalancer);
|
||||
|
||||
if (gslbRule.getAccountId() != loadBalancer.getAccountId()) {
|
||||
throw new InvalidParameterValueException("GSLB rule and load balancer rule does not belong to same account");
|
||||
}
|
||||
|
||||
if (loadBalancer.getState() == LoadBalancer.State.Revoke) {
|
||||
throw new InvalidParameterValueException("Load balancer ID " + loadBalancer.getUuid() + " is in revoke state");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue