From cc3bdf821c7465975996e034e5aa689667f58d76 Mon Sep 17 00:00:00 2001 From: Mengyi Zhou Date: Tue, 27 Dec 2016 16:35:45 +0800 Subject: [PATCH] bug fix --- .../com/ctrip/zeus/restful/resource/DeactivateResource.java | 2 -- .../zeus/service/model/handler/impl/DefaultSlbValidator.java | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/ctrip/zeus/restful/resource/DeactivateResource.java b/src/main/java/com/ctrip/zeus/restful/resource/DeactivateResource.java index df2a02c8..c2af2a57 100644 --- a/src/main/java/com/ctrip/zeus/restful/resource/DeactivateResource.java +++ b/src/main/java/com/ctrip/zeus/restful/resource/DeactivateResource.java @@ -260,8 +260,6 @@ public class DeactivateResource { throw new ValidationException("Cannot find vs by id " + vsId + "."); } - authService.authValidate(UserUtils.getUserName(request), ResourceOperationType.ACTIVATE, ResourceDataType.Vs, vsId); - ModelStatusMapping slbMap = entityFactory.getSlbsByIds(new Long[]{slbId}); Slb slb = slbMap.getOnlineMapping().get(slbId); if (slb == null) { diff --git a/src/main/java/com/ctrip/zeus/service/model/handler/impl/DefaultSlbValidator.java b/src/main/java/com/ctrip/zeus/service/model/handler/impl/DefaultSlbValidator.java index dddfba0d..f3b1bd4f 100644 --- a/src/main/java/com/ctrip/zeus/service/model/handler/impl/DefaultSlbValidator.java +++ b/src/main/java/com/ctrip/zeus/service/model/handler/impl/DefaultSlbValidator.java @@ -71,7 +71,7 @@ public class DefaultSlbValidator implements SlbValidator { } } if (check.size() == 0) - return; + continue; check.remove(slb.getId()); if (check.size() > 0) { throw new ValidationException("Slb server " + slbServer.getIp() + " exists in the system. Unique server ip is required.");