From 7667a1e05e21dc336503f058cac111fac91f06c6 Mon Sep 17 00:00:00 2001 From: Laurence Maultsby Date: Thu, 6 Apr 2017 14:48:03 -0400 Subject: [PATCH 1/1] Check for role object on users in project-config before mapping through values in userManagementAPI.getUserInfo Signed-off-by: Laurence Maultsby --- skyquake/framework/core/modules/api/userManagementAPI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skyquake/framework/core/modules/api/userManagementAPI.js b/skyquake/framework/core/modules/api/userManagementAPI.js index 873ab1933..c6260dfea 100644 --- a/skyquake/framework/core/modules/api/userManagementAPI.js +++ b/skyquake/framework/core/modules/api/userManagementAPI.js @@ -129,7 +129,7 @@ UserManagement.getUserInfo = function(req, userId, domain) { data: p, role: {} } - u.role.map(function(r) { + u.role && u.role.map(function(r) { userData.project[p.name].role[r.role] = true }); } -- 2.17.1