From fd7cbe8c26487430f96511d5c3277d1c1f641e74 Mon Sep 17 00:00:00 2001 From: Laurence Maultsby Date: Wed, 3 May 2017 12:05:03 -0400 Subject: [PATCH] Allow upload/update through session manager Signed-off-by: Laurence Maultsby --- skyquake/framework/core/modules/routes/navigation.js | 4 ++-- .../project_management/src/dashboard/dashboard.jsx | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/skyquake/framework/core/modules/routes/navigation.js b/skyquake/framework/core/modules/routes/navigation.js index 3f460e6ee..1d7b9011d 100644 --- a/skyquake/framework/core/modules/routes/navigation.js +++ b/skyquake/framework/core/modules/routes/navigation.js @@ -41,8 +41,8 @@ Router.get('/login.html', cors(), function(req, res) { res.render('login.html'); res.end(); }); - -Router.use(/^\/(?!session).*/, function(req, res, next) { +//Should have a way of adding excluded routes to this via plugin registry, instead of hard coding +Router.use(/^(?!.*(session|composer\/upload|composer\/update)).*/, function(req, res, next) { var api_server = req.query['api_server'] || (req.protocol + '://' + configurationAPI.globalConfiguration.get().api_server); if (req.session && req.session.loggedIn) { next(); diff --git a/skyquake/plugins/project_management/src/dashboard/dashboard.jsx b/skyquake/plugins/project_management/src/dashboard/dashboard.jsx index 8ddc36567..66c3f4873 100644 --- a/skyquake/plugins/project_management/src/dashboard/dashboard.jsx +++ b/skyquake/plugins/project_management/src/dashboard/dashboard.jsx @@ -132,6 +132,7 @@ class ProjectManagementDashboard extends React.Component { }); } cleanUsers(projectUsers, projectName) { + let self = this; let cleanUsers = []; //Remove null values from role projectUsers.map((u) => { @@ -152,7 +153,9 @@ class ProjectManagementDashboard extends React.Component { u.role = cleanRoles; u["rw-project-mano:mano-role"] = u["rw-project-mano:mano-role"] || []; u["rw-project-mano:mano-role"] = u["rw-project-mano:mano-role"].concat(cleanManoRoles); - cleanUsers.push(u); + if (u['user-name'] != self.context.userProfile.userId) { + cleanUsers.push(u); + } }); return cleanUsers; } @@ -390,7 +393,8 @@ class ProjectManagementDashboard extends React.Component { } // onClick={this.Store.update.bind(null, Account)} ProjectManagementDashboard.contextTypes = { - router: React.PropTypes.object + router: React.PropTypes.object, + userProfile: React.PropTypes.object }; ProjectManagementDashboard.defaultProps = { -- 2.25.1