mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
AC-301 attempting to prevent content flash between logins
This commit is contained in:
@@ -66,6 +66,14 @@ angular.module('AuthService', ['ngCookies'])
|
|||||||
},
|
},
|
||||||
|
|
||||||
logout: function() {
|
logout: function() {
|
||||||
|
// the following puts our primary scope up for garbage collection, which
|
||||||
|
// should prevent content flash from the prior user.
|
||||||
|
var scope = angular.element(getElementById('main-view')).scope();
|
||||||
|
scope.$destroy();
|
||||||
|
|
||||||
|
// but just in case, clear the organization bits
|
||||||
|
scope.organizations = null;
|
||||||
|
|
||||||
$rootScope.current_user = {};
|
$rootScope.current_user = {};
|
||||||
$rootScope.license_tested = undefined;
|
$rootScope.license_tested = undefined;
|
||||||
$cookieStore.remove('token');
|
$cookieStore.remove('token');
|
||||||
|
|||||||
Reference in New Issue
Block a user