noauth fix
This commit is contained in:
parent
17ead21fc9
commit
f6bb993458
2
pom.xml
2
pom.xml
|
@ -51,7 +51,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.loafle.overflow</groupId>
|
<groupId>com.loafle.overflow</groupId>
|
||||||
<artifactId>commons-java</artifactId>
|
<artifactId>commons-java</artifactId>
|
||||||
<version>1.0.64-SNAPSHOT</version>
|
<version>1.0.66-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class CentralNoAuthProbeService implements NoAuthProbeService {
|
||||||
|
|
||||||
@WebappAPI
|
@WebappAPI
|
||||||
@Transactional
|
@Transactional
|
||||||
public List<NoAuthProbe> acceptNoAuthProbe(Long noAuthProbeID, String zoneCIDR) throws OverflowException {
|
public NoAuthProbe acceptNoAuthProbe(Long noAuthProbeID, String zoneCIDR) throws OverflowException {
|
||||||
NoAuthProbe noAuthProbe = this.noAuthProbeDAO.findById(noAuthProbeID).get();
|
NoAuthProbe noAuthProbe = this.noAuthProbeDAO.findById(noAuthProbeID).get();
|
||||||
if (null == noAuthProbe) {
|
if (null == noAuthProbe) {
|
||||||
throw new OverflowException(String.format("ID(%s) of NoAuthProbe is not exist", noAuthProbeID));
|
throw new OverflowException(String.format("ID(%s) of NoAuthProbe is not exist", noAuthProbeID));
|
||||||
|
@ -185,24 +185,24 @@ public class CentralNoAuthProbeService implements NoAuthProbeService {
|
||||||
this.probeHostService.regist(probeHost);
|
this.probeHostService.regist(probeHost);
|
||||||
|
|
||||||
noAuthProbe.setMetaNoAuthProbeStatus(MetaNoAuthProbeStatus.Enum.ACCEPTED.to());
|
noAuthProbe.setMetaNoAuthProbeStatus(MetaNoAuthProbeStatus.Enum.ACCEPTED.to());
|
||||||
this.noAuthProbeDAO.save(noAuthProbe);
|
NoAuthProbe resultNoauthProbe = this.noAuthProbeDAO.save(noAuthProbe);
|
||||||
|
|
||||||
messagePublisher.publishToNoAuthProbe(noAuthProbe.getTempProbeKey(), "NoAuthProbeService.Accept",
|
messagePublisher.publishToNoAuthProbe(noAuthProbe.getTempProbeKey(), "NoAuthProbeService.Accept",
|
||||||
probe.getProbeKey());
|
probe.getProbeKey());
|
||||||
|
|
||||||
return this.readAllByDomainID(noAuthProbe.getDomain().getId());
|
return resultNoauthProbe;
|
||||||
}
|
}
|
||||||
|
|
||||||
@WebappAPI
|
@WebappAPI
|
||||||
public List<NoAuthProbe> denyNoauthProbe(Long noAuthProbeID) throws OverflowException {
|
public NoAuthProbe denyNoauthProbe(Long noAuthProbeID) throws OverflowException {
|
||||||
NoAuthProbe noAuthProbe = this.noAuthProbeDAO.findById(noAuthProbeID).get();
|
NoAuthProbe noAuthProbe = this.noAuthProbeDAO.findById(noAuthProbeID).get();
|
||||||
|
|
||||||
noAuthProbe.setMetaNoAuthProbeStatus(MetaNoAuthProbeStatus.Enum.DENIED.to());
|
noAuthProbe.setMetaNoAuthProbeStatus(MetaNoAuthProbeStatus.Enum.DENIED.to());
|
||||||
this.noAuthProbeDAO.save(noAuthProbe);
|
NoAuthProbe resultNoauthProbe = this.noAuthProbeDAO.save(noAuthProbe);
|
||||||
|
|
||||||
messagePublisher.publishToNoAuthProbe(noAuthProbe.getTempProbeKey(), "NoAuthProbeService.Deny");
|
messagePublisher.publishToNoAuthProbe(noAuthProbe.getTempProbeKey(), "NoAuthProbeService.Deny");
|
||||||
|
|
||||||
return this.readAllByDomainID(noAuthProbe.getDomain().getId());
|
return resultNoauthProbe;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NoAuthProbe readByTempProbeKey(String tempKey) throws OverflowException {
|
public NoAuthProbe readByTempProbeKey(String tempKey) throws OverflowException {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user