Merge pull request #17 from AAVikings/master

Adding pre-shared key authorisation
This commit is contained in:
z@tOr authored and GitHub committed 2019-02-02 11:54:56 -03:00
commit 6d2ca25d20
1 file changed
+2 -1
+2 -1
View File
@@ -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()
}