Adding read and write permissions to teams

This commit is contained in:
Matias committed 2019-07-07 21:13:43 -03:00
1 parent afb5a35269
commit 4b519f25b6
7 files changed
+70 -8

No files matched your search

+3 -1
View File
@@ -6,6 +6,7 @@ import { TeamInputType } from '../types/input'
import { copyBot } from '../../storage/CopyBot'
import { copySimulator } from '../../storage/CopySimulator'
import { createContainer, writeFileContent } from '../../storage/providers/MinioStorage'
import crypto from 'crypto'
export const args = { team: { type: TeamInputType } }
@@ -51,7 +52,8 @@ const resolve = async (parent, { team }, context) => {
url: process.env.NODE_ENDPOINT,
storage: 'localStorage',
container: team.codeName,
accessKey: '',
accessKey: crypto.randomBytes(128).toString('hex'),
ownerKey: crypto.randomBytes(128).toString('hex')
}
team.host = nodeEndpoint
}