mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
fix for session timeout
This commit is contained in:
parent
7c68f18060
commit
ef935768a5
@ -101,7 +101,7 @@ export default
|
||||
$rootScope.current_user = {};
|
||||
$rootScope.license_tested = undefined;
|
||||
$rootScope.userLoggedIn = false;
|
||||
$rootScope.sessionExpired = false;
|
||||
// $rootScope.sessionExpired = false;
|
||||
$rootScope.licenseMissing = true;
|
||||
$rootScope.token = null;
|
||||
$rootScope.token_expires = null;
|
||||
|
||||
@ -23,9 +23,9 @@
|
||||
*/
|
||||
export default
|
||||
['$rootScope', '$cookieStore', 'CreateDialog', 'Authorization',
|
||||
'Store', '$interval', '$location', '$q',
|
||||
'Store', '$interval', '$state', '$q',
|
||||
function ($rootScope, $cookieStore, CreateDialog, Authorization,
|
||||
Store, $interval, $location, $q) {
|
||||
Store, $interval, $state, $q) {
|
||||
return {
|
||||
|
||||
sessionTime: null,
|
||||
@ -157,13 +157,13 @@ export default
|
||||
$('#idle-modal').dialog('close');
|
||||
}
|
||||
that.expireSession('idle');
|
||||
$location.url('/login');
|
||||
$state.go('signOut');
|
||||
}
|
||||
if(Store('sessionTime') &&
|
||||
Store('sessionTime')[$rootScope.current_user.id] &&
|
||||
Store('sessionTime')[$rootScope.current_user.id].loggedIn === false){
|
||||
that.expireSession();
|
||||
$location.url('/login');
|
||||
$state.go('signOut');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -9,9 +9,9 @@
|
||||
export default {
|
||||
name: 'signOut',
|
||||
route: '/logout',
|
||||
controller: ['Authorization', '$location', function(Authorization, $location) {
|
||||
controller: ['Authorization', '$state', function(Authorization, $state) {
|
||||
Authorization.logout();
|
||||
$location.path('/login');
|
||||
$state.go('signIn');
|
||||
}],
|
||||
ncyBreadcrumb: {
|
||||
skip: true
|
||||
|
||||
@ -20,7 +20,7 @@ export default
|
||||
delete: function(){
|
||||
delete(this.config);
|
||||
},
|
||||
|
||||
|
||||
getConfig: function () {
|
||||
var config = this.get(),
|
||||
that = this,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user