From f500a04733a4dfe3182cf1f8cfe05ad23bfb21dd Mon Sep 17 00:00:00 2001 From: KIRAN KASHALKAR Date: Fri, 24 Mar 2017 01:11:47 -0400 Subject: [PATCH] NOTICKET: Refactor project management API to use auth held in session Signed-off-by: KIRAN KASHALKAR --- skyquake/framework/core/modules/api/projectManagementAPI.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skyquake/framework/core/modules/api/projectManagementAPI.js b/skyquake/framework/core/modules/api/projectManagementAPI.js index 5ba365942..3238aec91 100644 --- a/skyquake/framework/core/modules/api/projectManagementAPI.js +++ b/skyquake/framework/core/modules/api/projectManagementAPI.js @@ -188,7 +188,7 @@ ProjectManagement.getPlatform = function(req) { uri: utils.confdPort(api_server) + '/api/operational/rbac-platform-config', method: 'GET', headers: _.extend({}, constants.HTTP_HEADERS.accept.data, { - 'Authorization': req.get('Authorization') + 'Authorization': req.session && req.session.authorization }), forever: constants.FOREVER_ON, rejectUnauthorized: false, @@ -226,7 +226,7 @@ ProjectManagement.updatePlatform = function(req) { uri: utils.confdPort(api_server) + '/api/config/rbac-platform-config', method: 'PUT', headers: _.extend({}, constants.HTTP_HEADERS.accept.data, { - 'Authorization': req.get('Authorization') + 'Authorization': req.session && req.session.authorization }), forever: constants.FOREVER_ON, json: data, -- 2.17.1