Check for role object on users in project-config before mapping through values in...
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Thu, 6 Apr 2017 18:48:03 +0000 (14:48 -0400)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Thu, 6 Apr 2017 18:48:03 +0000 (14:48 -0400)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/framework/core/modules/api/userManagementAPI.js

index 873ab19..c6260df 100644 (file)
@@ -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
                             });
                         }