Fix usage of webadminStatus

This commit is contained in:
Girish Ramakrishnan
2018-12-14 15:24:00 -08:00
parent 54b9154457
commit a485df2f79
3 changed files with 14 additions and 11 deletions

View File

@@ -136,13 +136,12 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
// WARNING if anything about the routing is changed here test these use-cases:
//
// 1. Caas
// 2. selfhosted with --domain argument
// 3. selfhosted restore
// 4. local development with gulp develop
if (!status.activated) {
console.log('Not activated yet, redirecting', status);
if (status.webadminStatus.restore.active || status.webadminStatus.restore.error) {
if (status.restore.active || status.restore.errorMessage) {
window.location.href = '/restore.html';
} else {
window.location.href = status.adminFqdn ? '/setup.html' : '/setupdns.html';