From fe9ab91b3247f3e2d29024b05b50b7f1cbdc2789 Mon Sep 17 00:00:00 2001 From: "mati108@gmail.com" <34651529+matbenitez@users.noreply.github.com> Date: Sat, 2 Feb 2019 11:53:35 -0300 Subject: [PATCH] Adding pre-shared key authorization --- server/src/schema/cloneDetails.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/schema/cloneDetails.js b/server/src/schema/cloneDetails.js index 56d2d5f93..ec4ee89e2 100644 --- a/server/src/schema/cloneDetails.js +++ b/server/src/schema/cloneDetails.js @@ -5,7 +5,8 @@ import { AutorizationError } from '../errors' const cloneDetails = async(authId, team, clone) => { logger.debug('Retrieving clone details.') - if(!isAuthorized(team, authId)){ + // TODO Pending improvement by authorization module + if(!(authId === process.env.AACLOUD_ID || isAuthorized(team, authId))){ logger.debug('User %s is not authorized to manage team %s.', authId, team.slug ) throw new AutorizationError() }