From: Laurence Maultsby Date: Mon, 1 May 2017 19:48:50 +0000 (-0400) Subject: Mano roles in projects X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=407555cd9dac9e0dd9889da18082ae275a0a44fd;p=osm%2FUI.git Mano roles in projects Signed-off-by: Laurence Maultsby --- diff --git a/skyquake/framework/core/modules/api/sessions.js b/skyquake/framework/core/modules/api/sessions.js index 0c6709161..ca8669b45 100644 --- a/skyquake/framework/core/modules/api/sessions.js +++ b/skyquake/framework/core/modules/api/sessions.js @@ -104,7 +104,7 @@ sessionsAPI.create = function(req, res) { project['project-config']['user'].map(function(user) { if (user['user-name'] == username) { project_list_for_user.push(project); - user.role.map(function(role) { + user['rw-project-mano:mano-role'] && user['rw-project-mano:mano-role'].map(function(role) { if(role.role.indexOf('rw-project-mano:lcm') > -1) { isLCM = true; } diff --git a/skyquake/plugins/project_management/src/dashboard/dashboard.jsx b/skyquake/plugins/project_management/src/dashboard/dashboard.jsx index e9847e5f4..f8018d5e3 100644 --- a/skyquake/plugins/project_management/src/dashboard/dashboard.jsx +++ b/skyquake/plugins/project_management/src/dashboard/dashboard.jsx @@ -322,9 +322,13 @@ class ProjectManagementDashboard extends React.Component { { state.projectUsers.map((u,i)=> { - let userRoles = u.role && u.role.map((r) => { - return r.role; - }) || []; + let userRoles = [] + u.role && u.role.map((r) => { + userRoles.push(r.role); + }); + u["rw-project-mano:mano-role"] && u["rw-project-mano:mano-role"].map((r) => { + userRoles.push(r.role); + }); return ( {!state.isReadOnly ?