Mano roles in projects
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Mon, 1 May 2017 19:48:50 +0000 (15:48 -0400)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Mon, 1 May 2017 19:48:50 +0000 (15:48 -0400)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/framework/core/modules/api/sessions.js
skyquake/plugins/project_management/src/dashboard/dashboard.jsx
skyquake/skyquake.js

index 0c67091..ca8669b 100644 (file)
@@ -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;
                                 }
index e9847e5..f8018d5 100644 (file)
@@ -322,9 +322,13 @@ class ProjectManagementDashboard extends React.Component {
                             <tbody>
                                 {
                             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 (
                                     <tr key={i}>
                                         {!state.isReadOnly ? <td><span
index 6019357..685f049 100644 (file)
@@ -1,3 +1,5 @@
+
+
 /*
  *
  *   Copyright 2016 RIFT.IO Inc