[ARVADOS-WORKBENCH2] updated: 1.3.0-257-g5eb73301

Git user git at public.curoverse.com
Thu Dec 27 06:51:23 EST 2018


Summary of changes:
 src/store/users/users-actions.ts | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

       via  5eb7330194c44b696fd0a96e68eee9f153faa607 (commit)
      from  283e54cc304d07d92b5e1c6810e002610118fd09 (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 5eb7330194c44b696fd0a96e68eee9f153faa607
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Thu Dec 27 12:51:10 2018 +0100

    refs #14565-login-as-someone-list-against-get
    
    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 c1bad88b..da9fe3c1 100644
--- a/src/store/users/users-actions.ts
+++ b/src/store/users/users-actions.ts
@@ -51,8 +51,10 @@ export const openSetupShellAccount = (uuid: string) =>
 
 export const loginAs = (uuid: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-        const client = await services.apiClientAuthorizationService.get(uuid);
-        dispatch<any>(saveApiToken(client.apiToken));
+        const userUuid = getState().auth.user!.uuid;
+        const clients = await services.apiClientAuthorizationService.list();
+        const client = clients.items.find(it => it.uuid === userUuid);
+        dispatch<any>(saveApiToken(client!.apiToken));
         dispatch<any>(getUserDetails()).then(() => {
             location.reload();
             dispatch<any>(navigateToRootProject);

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list