From ad1b12ef73a2981ed40f3dbdb8d6e1cc9d35a2cd Mon Sep 17 00:00:00 2001 From: Eric Biagiotti Date: Wed, 8 May 2019 15:36:59 -0400 Subject: [PATCH] 15088: Adds logout before logging in to second account Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti --- src/store/link-account-panel/link-account-panel-actions.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/store/link-account-panel/link-account-panel-actions.ts b/src/store/link-account-panel/link-account-panel-actions.ts index 5e7a02b4..54657377 100644 --- a/src/store/link-account-panel/link-account-panel-actions.ts +++ b/src/store/link-account-panel/link-account-panel-actions.ts @@ -14,6 +14,7 @@ import { UserResource } from "~/models/user"; import { GroupResource } from "~/models/group"; import { LinkAccountPanelError, OriginatingUser } from "./link-account-panel-reducer"; import { navigateToRootProject } from "../navigation/navigation-action"; +import { login, logout } from "~/store/auth/auth-action"; export const linkAccountPanelActions = unionize({ LINK_INIT: ofType<{ targetUser: UserResource | undefined }>(), @@ -151,7 +152,8 @@ export const saveAccountLinkData = (t: LinkAccountType) => const accountToLink = {type: t, userUuid: services.authService.getUuid(), token: services.authService.getApiToken()} as AccountToLink; services.linkAccountService.saveToSession(accountToLink); const auth = getState().auth; - services.authService.login(auth.localCluster, auth.remoteHosts[auth.homeCluster]); + dispatch(logout()); + dispatch(login(auth.localCluster, auth.remoteHosts[auth.homeCluster])); }; export const getAccountLinkData = () => -- 2.30.2