From 7fce9799e75dd70775b5420c02bacadfed1ac0cd Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Fri, 24 Aug 2018 21:06:48 +0200 Subject: [PATCH] clear editorService and overlayService when a new user logs in --- src/Umbraco.Web.UI.Client/src/controllers/main.controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/controllers/main.controller.js b/src/Umbraco.Web.UI.Client/src/controllers/main.controller.js index a47f552c9d..24318cce02 100644 --- a/src/Umbraco.Web.UI.Client/src/controllers/main.controller.js +++ b/src/Umbraco.Web.UI.Client/src/controllers/main.controller.js @@ -8,7 +8,7 @@ * The main application controller * */ -function MainController($scope, $rootScope, $location, $routeParams, $timeout, $http, $log, appState, treeService, notificationsService, userService, navigationService, historyService, updateChecker, assetsService, eventsService, umbRequestHelper, tmhDynamicLocale, localStorageService, tourService, editorService) { +function MainController($scope, $location, appState, treeService, notificationsService, userService, historyService, updateChecker, assetsService, eventsService, tmhDynamicLocale, localStorageService, editorService, overlayService) { //the null is important because we do an explicit bool check on this in the view $scope.authenticated = null; @@ -87,6 +87,8 @@ function MainController($scope, $rootScope, $location, $routeParams, $timeout, $ $location.path("/").search(""); historyService.removeAll(); treeService.clearCache(); + editorService.closeAll(); + overlayService.close(); //if the user changed, clearout local storage too - could contain sensitive data localStorageService.clearAll();