diff --git a/ui/app/scripts/app.js b/ui/app/scripts/app.js index 65ce5b2d55..05583cc4e9 100644 --- a/ui/app/scripts/app.js +++ b/ui/app/scripts/app.js @@ -54,12 +54,7 @@ angular.module('thehive', ['ngAnimate', 'ngMessages', 'ngSanitize', 'ui.bootstra AuthenticationSrv.current(function(userData) { return deferred.resolve(userData); }, function(err, status) { - if (status === 520) { - return deferred.resolve('maintenance') - } else { - return deferred.resolve(status); - } - + return deferred.resolve(status === 520 ? status : null); }); return deferred.promise; diff --git a/ui/app/scripts/controllers/RootCtrl.js b/ui/app/scripts/controllers/RootCtrl.js index d6747e5ead..9e55e4106d 100644 --- a/ui/app/scripts/controllers/RootCtrl.js +++ b/ui/app/scripts/controllers/RootCtrl.js @@ -5,7 +5,7 @@ angular.module('theHiveControllers').controller('RootCtrl', function($scope, $uibModal, $location, $state, $base64, AuthenticationSrv, MispSrv, StreamSrv, StreamStatSrv, TemplateSrv, MetricsCacheSrv, AlertSrv, currentUser) { 'use strict'; - if(currentUser === 'maintenance') { + if(currentUser === 520) { $state.go('maintenance'); return; }else if(!currentUser || !currentUser.id) {