final Account adminAccount = accountDAO.getFirstAdmin();
final Account adminAccount = accountDAO.getFirstAdmin();
if (adminAccount == null) {
if (adminAccount == null) {
@@ -62,6 +72,7 @@ public class BubbleFirstTimeListener extends RestServerLifecycleListenerBase<Bub
accountDAO.unlock();
accountDAO.unlock();
return;
return;
}
}
final AccountPolicy adminPolicy = configuration.getBean(AccountPolicyDAO.class).findSingleByAccount(adminAccount.getUuid());
final AccountPolicy adminPolicy = configuration.getBean(AccountPolicyDAO.class).findSingleByAccount(adminAccount.getUuid());
if (adminPolicy == null || !adminPolicy.hasVerifiedNonAuthenticatorAccountContacts()) {
if (adminPolicy == null || !adminPolicy.hasVerifiedNonAuthenticatorAccountContacts()) {
log.error("onStart: no AccountPolicy found (or no verified non-authenticator contacts) for admin account (" + adminAccount.getEmail() + "), cannot send first time install message, unlocking now");
log.error("onStart: no AccountPolicy found (or no verified non-authenticator contacts) for admin account (" + adminAccount.getEmail() + "), cannot send first time install message, unlocking now");
@@ -69,9 +80,6 @@ public class BubbleFirstTimeListener extends RestServerLifecycleListenerBase<Bub
return;
return;
}
}
final BubbleNetwork network = configuration.getThisNetwork();
final SageHelloService helloService = configuration.getBean(SageHelloService.class);
final AccountMessage readyMessage = new AccountMessage()
final AccountMessage readyMessage = new AccountMessage()
.setAccount(adminAccount.getUuid())
.setAccount(adminAccount.getUuid())
.setNetwork(network.getUuid())
.setNetwork(network.getUuid())
@@ -82,19 +90,14 @@ public class BubbleFirstTimeListener extends RestServerLifecycleListenerBase<Bub
if (!network.launchLock()) {
if (!network.launchLock()) {
log.info("onStart: thisNetwork.launchLock was false, unlocking now");
log.info("onStart: thisNetwork.launchLock was false, unlocking now");