X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/f71049ee5bf2560fbbca09c1f141e176e1a7eb06..facccf58114be4d8c7a08286cd2197bd222abdc1:/src/views-components/user-dialog/manage-dialog.tsx

diff --git a/src/views-components/user-dialog/manage-dialog.tsx b/src/views-components/user-dialog/manage-dialog.tsx
index 05e4a3fc..b812f5cb 100644
--- a/src/views-components/user-dialog/manage-dialog.tsx
+++ b/src/views-components/user-dialog/manage-dialog.tsx
@@ -2,15 +2,16 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from "react";
-import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Typography } from "@material-ui/core";
-import { WithDialogProps } from "~/store/dialog/with-dialog";
-import { withDialog } from '~/store/dialog/with-dialog';
-import { WithStyles, withStyles } from '@material-ui/core/styles';
-import { ArvadosTheme } from '~/common/custom-theme';
+import React from "react";
 import { compose, Dispatch } from "redux";
-import { USER_MANAGEMENT_DIALOG, openSetupShellAccount, loginAs } from "~/store/users/users-actions";
 import { connect } from "react-redux";
+import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Typography } from "@material-ui/core";
+import { WithDialogProps } from "store/dialog/with-dialog";
+import { withDialog } from 'store/dialog/with-dialog';
+import { WithStyles, withStyles } from '@material-ui/core/styles';
+import { ArvadosTheme } from 'common/custom-theme';
+import { USER_MANAGEMENT_DIALOG, openSetupShellAccount, loginAs } from "store/users/users-actions";
+import { getUserDisplayName } from "models/user";
 
 type CssRules = 'spacing';
 
@@ -48,19 +49,19 @@ export const UserManageDialog = compose(
                 maxWidth="md">
                 {props.data &&
                     <span>
-                        <DialogTitle>{`Manage - ${props.data.firstName} ${props.data.lastName}`}</DialogTitle>
+                        <DialogTitle>{`Manage - ${getUserDisplayName(props.data)}`}</DialogTitle>
                         <DialogContent>
                             <Typography variant='body1' 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)}>
-                                {`LOG IN AS ${props.data.firstName} ${props.data.lastName}`}
+                                {`LOG IN AS ${getUserDisplayName(props.data)}`}
                             </Button>
                             <Typography variant='body1' 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.uuid)}>
-                                {`SETUP SHELL ACCOUNT FOR ${props.data.firstName} ${props.data.lastName}`}
+                                {`SETUP SHELL ACCOUNT FOR ${getUserDisplayName(props.data)}`}
                             </Button>
                         </DialogContent></span>}
 
