mirror of
https://github.com/ansible/awx.git
synced 2026-07-29 08:59:55 -02:30
Socket.io
Downgraded library to 0.9.16. Version 1 and above requires CORS to be enabled on the server side socket port. If it's not enabled, the OPTIONS request fails.
This commit is contained in:
@@ -532,8 +532,8 @@ angular.module('Tower', [
|
||||
activateTab();
|
||||
});
|
||||
|
||||
if (!Authorization.getToken()) {
|
||||
// When the app first loads, redirect to login page
|
||||
if (!Authorization.getToken() || !Authorization.isUserLoggedIn()) {
|
||||
// User not authenticated, redirect to login page
|
||||
$rootScope.sessionExpired = false;
|
||||
$cookieStore.put('sessionExpired', false);
|
||||
$location.path('/login');
|
||||
|
||||
@@ -7,11 +7,19 @@
|
||||
* Controller functions for user authentication.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name controllers.function:Authentication
|
||||
* @description This controller's for authenticating users
|
||||
*/
|
||||
* @description
|
||||
* Controller for handling /#/login and /#/logout routes.
|
||||
*
|
||||
* Tower (app.js) checks if the user is authenticated and whether the user session is in an unexpired state. If either condition is not true,
|
||||
* the user is redirected to /#/login.
|
||||
*
|
||||
* Functions for checking the session state are found in [lib/ansible/AuthService.js](/static/docs/api/lib.ansible.function:AuthService)
|
||||
*
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
function Authenticate($log, $cookieStore, $compile, $window, $scope, $rootScope, $location, Authorization, ToggleClass, Alert, Wait,
|
||||
|
||||
Reference in New Issue
Block a user