From: KIRAN KASHALKAR Date: Fri, 24 Mar 2017 05:11:47 +0000 (-0400) Subject: NOTICKET: Refactor project management API to use auth held in session X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=f500a04733a4dfe3182cf1f8cfe05ad23bfb21dd;p=osm%2FUI.git NOTICKET: Refactor project management API to use auth held in session Signed-off-by: KIRAN KASHALKAR --- 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,