From 90099449d300acbddb51503e712e28934f64262b Mon Sep 17 00:00:00 2001 From: Dileesha Rajapakse Date: Mon, 17 Jul 2017 17:11:34 +0530 Subject: [PATCH] Fixing issue 1184 - Redirection not handled upon session expiration --- .../devicemgt/app/modules/business-controllers/group.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/group.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/group.js index 82ecb1ae3d5..348251622f7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/group.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/group.js @@ -41,7 +41,9 @@ var groupModule = {}; } else { if (!user) { log.error("User object was not found in the session"); - throw constants["ERRORS"]["USER_NOT_FOUND"]; + userModule.logout(function () { + response.sendRedirect(devicemgtProps["appContext"] + "login"); + }); } log.error("Access denied for user: " + user.username); return -1;