Error handled on the user session invalidation

revert-70aa11f8
Kamidu Sachith Punchihewa 8 years ago committed by GitHub
parent 318fbf9215
commit 527b844ee3

@ -463,7 +463,13 @@ var userModule = function () {
publicMethods.isAuthorized = function (permission) {
var carbon = require("carbon");
var carbonServer = application.get("carbonServer");
var carbonUser = session.get(constants.USER_SESSION_KEY);
var carbonUser;
try {
carbonUser = session.get(constants.USER_SESSION_KEY);
} catch (e) {
log.error("User object was not found in the session");
carbonUser = null;
}
var utility = require('/app/modules/utility.js').utility;
if (!carbonUser) {
log.error("User object was not found in the session");

Loading…
Cancel
Save