GUACAMOLE-1744: Clean up UI only if user is not logged in.

This commit is contained in:
Michael Jumper
2023-02-28 11:01:42 -08:00
parent 9caf5c530f
commit 5b8170eee4

View File

@@ -252,7 +252,7 @@ angular.module('index').controller('indexController', ['$scope', '$injector',
// that connection activity will already automatically check session
// validity.
$interval(function cleanUpViewIfSessionInvalid() {
if ($scope.applicationState === ApplicationState.READY && !hasActiveTunnel()) {
if (!!authenticationService.getCurrentToken() && !hasActiveTunnel()) {
authenticationService.getValidity().then(function validityDetermined(valid) {
if (!valid)
$scope.reAuthenticate();