mirror of
https://github.com/ansible/awx.git
synced 2026-01-24 07:51:23 -03:30
Websocket would connect before login
The websockets would make a connection before login when the user refreshes the login page. I believe this was happening on upgrade too.
This commit is contained in:
parent
90c8f18f76
commit
208e08410f
@ -631,6 +631,11 @@ angular.module('Tower', [
|
||||
} else {
|
||||
// If browser refresh, set the user_is_superuser value
|
||||
$rootScope.user_is_superuser = Authorization.getUserInfo('is_superuser');
|
||||
// when the user refreshes we want to open the socket, except if the user is on the login page, which should happen after the user logs in (see the AuthService module for that call to OpenSocket)
|
||||
if($location.$$url !== '/login'){
|
||||
$rootScope.$emit('OpenSocket');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
activateTab();
|
||||
|
||||
@ -141,7 +141,6 @@ angular.module('AuthService', ['ngCookies', 'Utilities'])
|
||||
|
||||
restoreUserInfo: function () {
|
||||
$rootScope.current_user = $cookieStore.get('current_user');
|
||||
// $rootScope.$emit('OpenSocket');
|
||||
},
|
||||
|
||||
getUserInfo: function (key) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user