X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a353970c1fcfc61ebac8b3587f4b16b6c25b62e1..37f3a8d7a7ce05a15fbb9219763b46ba1c250976:/src/store/collections/collection-info-actions.ts diff --git a/src/store/collections/collection-info-actions.ts b/src/store/collections/collection-info-actions.ts index 49fe54f67e..d874c322d0 100644 --- a/src/store/collections/collection-info-actions.ts +++ b/src/store/collections/collection-info-actions.ts @@ -6,6 +6,7 @@ import { Dispatch } from "redux"; import { RootState } from "~/store/store"; import { ServiceRepository } from "~/services/services"; import { dialogActions } from '~/store/dialog/dialog-actions'; +import { getNewExtraToken } from "../auth/auth-action"; export const COLLECTION_WEBDAV_S3_DIALOG_NAME = 'collectionWebdavS3Dialog'; @@ -17,21 +18,24 @@ export interface WebDavS3InfoDialogData { localCluster: string; username: string; activeTab: number; + collectionName?: string; setActiveTab: (event: any, tabNr: number) => void; } export const openWebDavS3InfoDialog = (uuid: string, activeTab?: number) => - (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { + async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { + await dispatch(getNewExtraToken(true)); dispatch(dialogActions.OPEN_DIALOG({ id: COLLECTION_WEBDAV_S3_DIALOG_NAME, data: { title: 'Access Collection using WebDAV or S3', - token: getState().auth.apiToken, + token: getState().auth.extraApiToken || getState().auth.apiToken, downloadUrl: getState().auth.config.keepWebServiceUrl, collectionsUrl: getState().auth.config.keepWebInlineServiceUrl, localCluster: getState().auth.localCluster, username: getState().auth.user!.username, activeTab: activeTab || 0, + collectionName: (getState().collectionPanel.item || {} as any).name, setActiveTab: (event: any, tabNr: number) => dispatch(openWebDavS3InfoDialog(uuid, tabNr)), uuid }