summaryrefslogtreecommitdiff
path: root/www/js/WizardCtrl.js
diff options
context:
space:
mode:
authorDamir Merdan <44159556+dado-ca@users.noreply.github.com>2018-11-14 11:17:18 +0100
committerGitHub <noreply@github.com>2018-11-14 11:17:18 +0100
commitbb78ec417458347887a0668223dc7fd7bad377ea (patch)
tree494a609118c85467702061a743e9fd0b7dba1860 /www/js/WizardCtrl.js
parentb2cccc52c08f8195a1ddbb747c949915134940b4 (diff)
parentdbee219a9674daadd05aa1a27b36e76d91a35b5f (diff)
Merge branch 'master' into master
Diffstat (limited to 'www/js/WizardCtrl.js')
-rw-r--r--www/js/WizardCtrl.js22
1 files changed, 21 insertions, 1 deletions
diff --git a/www/js/WizardCtrl.js b/www/js/WizardCtrl.js
index f4b3d456..8a5f1ac4 100644
--- a/www/js/WizardCtrl.js
+++ b/www/js/WizardCtrl.js
@@ -2,7 +2,7 @@
/* jslint browser: true*/
/* global cordova,StatusBar,angular,console, Masonry, URI */
-angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$rootScope', '$ionicModal', 'NVRDataModel', '$ionicSideMenuDelegate', '$ionicHistory', '$state', '$ionicPopup', 'SecuredPopups', '$http', '$q', 'zm', '$ionicLoading', 'WizardHandler', '$translate', function ($scope, $rootScope, $ionicModal, NVRDataModel, $ionicSideMenuDelegate, $ionicHistory, $state, $ionicPopup, SecuredPopups, $http, $q, zm, $ionicLoading, WizardHandler, $translate) {
+angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$rootScope', '$ionicModal', 'NVRDataModel', '$ionicSideMenuDelegate', '$ionicHistory', '$state', '$ionicPopup', 'SecuredPopups', '$http', '$q', 'zm', '$ionicLoading', 'WizardHandler', '$translate', '$cookies', function ($scope, $rootScope, $ionicModal, NVRDataModel, $ionicSideMenuDelegate, $ionicHistory, $state, $ionicPopup, SecuredPopups, $http, $q, zm, $ionicLoading, WizardHandler, $translate, $cookies) {
$scope.openMenu = function () {
$ionicSideMenuDelegate.toggleLeft();
};
@@ -342,6 +342,26 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$
function logout(u) {
var d = $q.defer();
+ NVRDataModel.debug ("Clearing cookies");
+ if (window.cordova) {
+ // we need to do this or ZM will send same auth hash
+ // this was fixed in a PR dated Oct 18
+
+ cordova.plugin.http.clearCookies();
+ }
+ else {
+ angular.forEach($cookies, function (v, k) {
+ $cookies.remove(k);
+ });
+ }
+
+ if ($scope.wizard.useauth && $scope.wizard.usebasicauth) {
+ NVRDataModel.debug ("setting basic auth with "+$scope.wizard.basicuser+":"+$scope.wizard.basicpassword);
+ cordova.plugin.http.useBasicAuth($scope.wizard.basicuser, $scope.wizard.basicpassword);
+
+ }
+
+
$http({
method: 'POST',