[ARVADOS-WORKBENCH2] updated: 1.3.1-363-g7335a6a0

Git user git at public.curoverse.com
Fri Feb 22 15:14:07 EST 2019


Summary of changes:
 src/views-components/main-app-bar/account-menu.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

       via  7335a6a0b9a54bfacc94f2d8c9e57827fc77553f (commit)
      from  a67a8e8330787ac509d15a28317e5c6915cc3a07 (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 7335a6a0b9a54bfacc94f2d8c9e57827fc77553f
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Fri Feb 22 15:11:20 2019 -0500

    14841: Pass token when switching to workbench v1
    
    Avoids "not logged in" bugs, making user log in again, or being logged
    in as a different users in workbench v1 and v2.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/src/views-components/main-app-bar/account-menu.tsx b/src/views-components/main-app-bar/account-menu.tsx
index 271cf00f..c04d0045 100644
--- a/src/views-components/main-app-bar/account-menu.tsx
+++ b/src/views-components/main-app-bar/account-menu.tsx
@@ -25,12 +25,14 @@ interface AccountMenuProps {
     user?: User;
     currentRoute: string;
     workbenchURL: string;
+    apiToken?: string;
 }
 
 const mapStateToProps = (state: RootState): AccountMenuProps => ({
     user: state.auth.user,
     currentRoute: state.router.location ? state.router.location.pathname : '',
     workbenchURL: state.config.workbenchUrl,
+    apiToken: state.auth.apiToken
 });
 
 const wb1URL = (route: string) => {
@@ -54,7 +56,7 @@ const styles: StyleRulesCallback<CssRules> = () => ({
 
 export const AccountMenu = withStyles(styles)(
     connect(mapStateToProps)(
-        ({ user, dispatch, currentRoute, workbenchURL, classes }: AccountMenuProps & DispatchProp<any> & WithStyles<CssRules>) =>
+        ({ user, dispatch, currentRoute, workbenchURL, apiToken, classes }: AccountMenuProps & DispatchProp<any> & WithStyles<CssRules>) =>
             user
                 ? <DropdownMenu
                     icon={<UserPanelIcon />}
@@ -71,7 +73,7 @@ export const AccountMenu = withStyles(styles)(
                     <MenuItem onClick={() => dispatch(navigateToSiteManager)}>Site Manager</MenuItem>
                     <MenuItem onClick={() => dispatch(navigateToMyAccount)}>My account</MenuItem>
                     <MenuItem>
-                        <a href={`${workbenchURL.replace(/\/$/, "")}/${wb1URL(currentRoute)}`}
+                        <a href={`${workbenchURL.replace(/\/$/, "")}/${wb1URL(currentRoute)}?api_token=${apiToken}`}
                             className={classes.link}>
                             Switch to Workbench v1</a></MenuItem>
                     <Divider />

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list