From 9e818c288277676ae618a79d03b2bc975787137b Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Mon, 27 Mar 2017 15:24:35 +0200 Subject: [PATCH] fix(authentication): remove any user credentials if not allowed on any endpoint (#719) --- app/components/auth/authController.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/components/auth/authController.js b/app/components/auth/authController.js index 7d5026039..f12ed3c53 100644 --- a/app/components/auth/authController.js +++ b/app/components/auth/authController.js @@ -104,6 +104,7 @@ function ($scope, $state, $stateParams, $window, $timeout, $sanitize, Config, Au else if (data.length === 0 && userDetails.role === 1) { $state.go('endpointInit'); } else if (data.length === 0 && userDetails.role === 2) { + Authentication.logout(); $scope.authData.error = 'User not allowed. Please contact your administrator.'; } })