diff --git a/awx/ui/static/js/controllers/Authentication.js b/awx/ui/static/js/controllers/Authentication.js index b59908137e..d5c4486ae2 100644 --- a/awx/ui/static/js/controllers/Authentication.js +++ b/awx/ui/static/js/controllers/Authentication.js @@ -13,13 +13,20 @@ function Authenticate($log, $cookieStore, $compile, $window, $scope, $rootScope, $location, Authorization, ToggleClass, Alert, Wait, Timer, Empty) { - var setLoginFocus, lastPath, sessionExpired, + var setLoginFocus, lastPath, sessionExpired, loginAgain, e, html, scope = $rootScope.$new(); setLoginFocus = function () { $('#login-username').focus(); }; + loginAgain = function() { + Authorization.logout(); + setTimeout(function() { + window.location = '/#/logout'; // if we get here, force user back to re-login + }, 500); + }; + scope.sessionExpired = (Empty($rootScope.sessionExpired)) ? $cookieStore.get('sessionExpired') : $rootScope.sessionExpired; scope.login_username = ''; scope.login_password = ''; @@ -53,8 +60,8 @@ function Authenticate($log, $cookieStore, $compile, $window, $scope, $rootScope, "" + "\n" + "
\n" + - "
Welcome to Ansible Tower!  Please sign in.
\n" + - "
Your session timed out due to inactivity. Please sign in.
\n" + + "
Welcome to Ansible Tower!  Please sign in.
\n" + + "
Your session timed out due to inactivity. Please sign in.
\n" + "
\n" + "
\n" + "\n" + @@ -129,7 +136,7 @@ function Authenticate($log, $cookieStore, $compile, $window, $scope, $rootScope, }) .error(function () { Wait('stop'); - Alert('Error', 'Failed to access license information. GET returned status: ' + status, 'alert-danger', setLoginFocus); + Alert('Error', 'Failed to access license information. GET returned status: ' + status, 'alert-danger', loginAgain); }); }); @@ -146,7 +153,7 @@ function Authenticate($log, $cookieStore, $compile, $window, $scope, $rootScope, }) .error(function (data, status) { Wait('stop'); - Alert('Error', 'Failed to access user information. GET returned status: ' + status, 'alert-danger', setLoginFocus); + Alert('Error', 'Failed to access user information. GET returned status: ' + status, 'alert-danger', loginAgain); }); }); diff --git a/config/awx-munin.conf b/config/awx-munin.conf index 90c479f77a..833a6f36bf 100644 --- a/config/awx-munin.conf +++ b/config/awx-munin.conf @@ -1,17 +1,12 @@ - -Alias /munin /var/cache/munin/www - +Alias /munin /var/www/html/munin/ + Order Allow,Deny Allow from all - Options FollowSymLinks AuthUserFile /var/lib/awx/.munin_htpasswd AuthName "Munin" AuthType Basic require valid-user - - ExpiresActive On - ExpiresDefault M310 - +ScriptAlias /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph \ No newline at end of file