From af2b59902e50264a9a34f4ca0a5bdf06ecc13b8d Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 8 Jan 2018 10:43:25 -0500 Subject: #499 - fix case when you try and configure ES before logging into portal (first setup) --- www/js/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'www/js/app.js') diff --git a/www/js/app.js b/www/js/app.js index 1a226155..cf608567 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -865,6 +865,8 @@ angular.module('zmApp', [ //------------------------------------------------------------------ $rootScope.$on("auth-success", function () { + + $rootScope.isLoggedIn = true; var contentBannerInstance = $ionicContentBanner.show({ text: ['ZoneMinder' + $translate.instant('kAuthSuccess')], interval: 2000, @@ -1238,6 +1240,7 @@ angular.module('zmApp', [ //console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>INSIDE RUN"); $rootScope.textScaleFactor = 1.0; + $rootScope.isLoggedIn = false; $rootScope.apiValid = false; $rootScope.db = null; @@ -1451,7 +1454,7 @@ angular.module('zmApp', [ } - if (NVRDataModel.isLoggedIn() || toState.data.requireLogin == false) { + if (NVRDataModel.hasLoginInfo() || toState.data.requireLogin == false) { //console.log("State transition is authorized"); return; -- cgit v1.2.3