[ARVADOS-WORKBENCH2] updated: 1.3.0-357-g75a77f7b
Git user
git at public.curoverse.com
Wed Feb 13 06:27:52 EST 2019
Summary of changes:
src/services/collection-service/collection-service.ts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
via 75a77f7bf1b104d58e1d2bcfdb7e0d76a59a2909 (commit)
from 70222e9fc05c3ad515ac290e5cbd6302b4f2efc8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 75a77f7bf1b104d58e1d2bcfdb7e0d76a59a2909
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Wed Feb 13 12:27:44 2019 +0100
refs #14671-download-file-from-collection-asks-for-auth
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
diff --git a/src/services/collection-service/collection-service.ts b/src/services/collection-service/collection-service.ts
index f0f25a2d..84b2cc1c 100644
--- a/src/services/collection-service/collection-service.ts
+++ b/src/services/collection-service/collection-service.ts
@@ -54,9 +54,14 @@ export class CollectionService extends TrashableResourceService<CollectionResour
const baseUrl = this.webdavClient.defaults.baseURL.endsWith('/')
? this.webdavClient.defaults.baseURL.slice(0, -1)
: this.webdavClient.defaults.baseURL;
+ const apiToken = this.authService.getApiToken();
+ const splittedApiToken = apiToken ? apiToken.split('/') : [];
+ const userApiToken = `/t=${splittedApiToken[2]}/`;
+ const splittedPrevFileUrl = file.url.split('/');
+ const url = `${baseUrl}/${splittedPrevFileUrl[1]}${userApiToken}${splittedPrevFileUrl[2]}`;
return {
...file,
- url: baseUrl + file.url
+ url
};
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list