Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 08071e0

Browse files
committed
Change collections gaia auth token scope to ArchivalPrefix.
1 parent 7937c54 commit 08071e0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/js/utils/collection-utils.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ const DEFAULT_NEW_COLLECTION_SETTING_ARRAY = [{
1212
encryptionKeyIndex: 0
1313
}]
1414

15+
const ARCHIVAL_GAIA_AUTH_SCOPE = 'putFileArchivalPrefix'
16+
const COLLECTION_GAIA_PREFIX = 'collection'
17+
1518
export function getCollectionEncryptionIndex(collectionName, settings, updateIdentityCollectionSettings) {
1619
if(!settings.collection
1720
|| !settings.collection[collectionName]
@@ -41,7 +44,11 @@ export function getCollectionGaiaHubConfigs(scopes, node, gaiaHubUrl) {
4144
const hubConfigPromises = scopes.map((scope) => {
4245
const collectionPrivateKey =
4346
node.getCollectionNode(scope).getCollectionPrivateKey()
44-
return connectToGaiaHub(gaiaHubUrl, collectionPrivateKey)
47+
const scopes = [{
48+
scope: ARCHIVAL_GAIA_AUTH_SCOPE,
49+
domain: COLLECTION_GAIA_PREFIX
50+
}]
51+
return connectToGaiaHub(gaiaHubUrl, collectionPrivateKey, "", scopes)
4552
})
4653

4754
return Promise.all(hubConfigPromises)

0 commit comments

Comments
 (0)