mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
AC-301 attempting to prevent content flash between logins
This commit is contained in:
parent
9fc8c0725c
commit
1c84e8a56a
@ -66,6 +66,14 @@ angular.module('AuthService', ['ngCookies'])
|
||||
},
|
||||
|
||||
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.license_tested = undefined;
|
||||
$cookieStore.remove('token');
|
||||
|
Loading…
Reference in New Issue
Block a user