[ARVADOS-WORKBENCH2] updated: 1.3.0-264-g91feb6c2

Git user git at public.curoverse.com
Thu Dec 27 07:46:56 EST 2018


Summary of changes:
 src/store/users/users-actions.ts                   | 4 ++--
 src/views-components/user-dialog/manage-dialog.tsx | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

       via  91feb6c2087d1584bd4b1c07044497295f3ff6c9 (commit)
      from  154991e8c07361906eab8a1fdefa00858bbc6818 (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 91feb6c2087d1584bd4b1c07044497295f3ff6c9
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Thu Dec 27 13:46:42 2018 +0100

    refs #14565-login-as-someone-by-created-at-prop
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>

diff --git a/src/store/users/users-actions.ts b/src/store/users/users-actions.ts
index 9b721e60..334800d4 100644
--- a/src/store/users/users-actions.ts
+++ b/src/store/users/users-actions.ts
@@ -49,10 +49,10 @@ export const openSetupShellAccount = (uuid: string) =>
         dispatch(dialogActions.OPEN_DIALOG({ id: SETUP_SHELL_ACCOUNT_DIALOG, data: { user, ...virtualMachines } }));
     };
 
-export const loginAs = (uuid: string) =>
+export const loginAs = (createdAt: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const clients = await services.apiClientAuthorizationService.list();
-        const client = clients.items.find(it => it.uuid === uuid);
+        const client = clients.items.find(it => it.createdAt === createdAt);
         dispatch<any>(saveApiToken(client!.apiToken));
         dispatch<any>(getUserDetails()).then(() => {
             location.reload();
diff --git a/src/views-components/user-dialog/manage-dialog.tsx b/src/views-components/user-dialog/manage-dialog.tsx
index 8db1e053..59779928 100644
--- a/src/views-components/user-dialog/manage-dialog.tsx
+++ b/src/views-components/user-dialog/manage-dialog.tsx
@@ -52,7 +52,7 @@ export const UserManageDialog = compose(
                     <Typography variant="body2" className={props.classes.spacing}>
                         As an admin, you can log in as this user. When you’ve finished, you will need to log out and log in again with your own account.
                     </Typography>
-                    <Button variant="contained" color="primary" onClick={() => props.loginAs(props.data.uuid)}>
+                    <Button variant="contained" color="primary" onClick={() => props.loginAs(props.data.createdAt)}>
                         {`LOG IN AS ${props.data.firstName} ${props.data.lastName}`}
                     </Button>
                     <Typography variant="body2" className={props.classes.spacing}>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list