Commit 63ad87a0 authored by michael.simon's avatar michael.simon
Browse files

Registry check status before depro

parent c7dca1cd
......@@ -574,6 +574,11 @@ public class RegisterUserServiceImpl implements RegisterUserService {
@Override
public void deprovision(RegistryEntity registry, String executor) throws RegisterException {
if (! RegistryStatus.DELETED.equals(registry.getRegistryStatus())) {
throw new RegisterException("only registry with status deleted can be deprovisioned");
}
ServiceRegisterAuditor auditor = new ServiceRegisterAuditor(auditDao, auditDetailDao, appConfig);
auditor.startAuditTrail(executor);
auditor.setName(registry.getService().getShortName() + "-Deregister-Audit");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment