refs #14565-fix
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Thu, 27 Dec 2018 13:28:25 +0000 (14:28 +0100)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Thu, 27 Dec 2018 13:28:25 +0000 (14:28 +0100)
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>

src/store/users/users-actions.ts
src/views-components/user-dialog/manage-dialog.tsx

index b794452422624aee7b3bc436a8ee7ee1ed81caab..71fd107b755ec366d96066e5ec8307b0415ee217 100644 (file)
@@ -133,3 +133,4 @@ export const loadUsersPanel = () =>
     (dispatch: Dispatch) => {
         dispatch(userBindedActions.REQUEST_ITEMS());
     };
+    
\ No newline at end of file
index 5b69dcbeae35971824533dc538b959a243680ead..59779928dae2f92af5697efe5e7849be3d38ca15 100644 (file)
@@ -12,7 +12,6 @@ import { compose, Dispatch } from "redux";
 import { USER_MANAGEMENT_DIALOG, openSetupShellAccount, loginAs } from "~/store/users/users-actions";
 import { UserResource } from "~/models/user";
 import { connect } from "react-redux";
-import { ApiClientAuthorization } from '~/models/api-client-authorization';
 
 type CssRules = 'spacing';
 
@@ -24,10 +23,7 @@ const styles = withStyles<CssRules>((theme: ArvadosTheme) => ({
 }));
 
 interface UserManageDataProps {
-    data: {
-        user: UserResource;
-        client: ApiClientAuthorization;
-    };
+    data: UserResource;
 }
 
 interface UserManageActionProps {
@@ -51,19 +47,19 @@ export const UserManageDialog = compose(
                 onClose={props.closeDialog}
                 fullWidth
                 maxWidth="md">
-                <DialogTitle>{`Manage - ${props.data.user.firstName} ${props.data.user.lastName}`}</DialogTitle>
+                <DialogTitle>{`Manage - ${props.data.firstName} ${props.data.lastName}`}</DialogTitle>
                 <DialogContent>
                     <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.client.uuid)}>
-                        {`LOG IN AS ${props.data.user.firstName} ${props.data.user.lastName}`}
+                    <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}>
                         As an admin, you can setup a shell account for this user. The login name is automatically generated from the user's e-mail address.
                     </Typography>
-                    <Button variant="contained" color="primary" onClick={() => props.openSetupShellAccount(props.data.user.uuid)}>
-                        {`SETUP SHELL ACCOUNT FOR ${props.data.user.firstName} ${props.data.user.lastName}`}
+                    <Button variant="contained" color="primary" onClick={() => props.openSetupShellAccount(props.data.uuid)}>
+                        {`SETUP SHELL ACCOUNT FOR ${props.data.firstName} ${props.data.lastName}`}
                     </Button>
                 </DialogContent>
                 <DialogActions>