From 836700fb7e52e9c3ddf16c6005916a81da2542e8 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 8 May 2017 15:43:10 -0400 Subject: [PATCH] (js) Improve CAS handling --- UI/WebServerResources/js/Common/Common.app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/UI/WebServerResources/js/Common/Common.app.js b/UI/WebServerResources/js/Common/Common.app.js index 9ed33ce9b..77b8a6810 100644 --- a/UI/WebServerResources/js/Common/Common.app.js +++ b/UI/WebServerResources/js/Common/Common.app.js @@ -255,14 +255,14 @@ /** * @ngInject */ - ErrorInterceptor.$inject = ['$rootScope', '$q', '$injector']; - function ErrorInterceptor($rootScope, $q, $injector) { + ErrorInterceptor.$inject = ['$rootScope', '$window', '$q', '$injector']; + function ErrorInterceptor($rootScope, $window, $q, $injector) { return { responseError: function(rejection) { var deferred, iframe; if (/^application\/json/.test(rejection.config.headers.Accept)) { - // Handle CAS ticket renewal (TODO: add check on usesCASAuthentication) - if (rejection.status == -1) { + // Handle CAS ticket renewal + if ($window.usesCASAuthentication && rejection.status == -1) { deferred = $q.defer(); iframe = angular.element(''); iframe.on('load', function() {