18559: Allow editing user fname/lname
authorStephen Smith <stephen@curii.com>
Thu, 31 Mar 2022 01:17:47 +0000 (21:17 -0400)
committerStephen Smith <stephen@curii.com>
Thu, 31 Mar 2022 01:17:47 +0000 (21:17 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/views/user-profile-panel/user-profile-panel-root.tsx

index 6a3adb92617b9d6a3968493a808d0c9f02196920..531d3bdbfbcd092bdeccdb3794e4d7571c8835a9 100644 (file)
@@ -228,16 +228,16 @@ export const UserProfilePanelRoot = withStyles(styles)(
                                         <Field
                                             label="First name"
                                             name="firstName"
-                                            component={ReadOnlyField as any}
-                                            disabled
+                                            component={TextField as any}
+                                            disabled={!this.props.isAdmin && !this.props.isSelf}
                                         />
                                     </Grid>
                                     <Grid item className={this.props.classes.gridItem} sm={6} xs={12} data-cy="lastName">
                                         <Field
                                             label="Last name"
                                             name="lastName"
-                                            component={ReadOnlyField as any}
-                                            disabled
+                                            component={TextField as any}
+                                            disabled={!this.props.isAdmin && !this.props.isSelf}
                                         />
                                     </Grid>
                                     <Grid item className={this.props.classes.gridItem} sm={6} xs={12} data-cy="email">
@@ -289,7 +289,6 @@ export const UserProfilePanelRoot = withStyles(styles)(
                                             name="prefs.profile.website_url"
                                             component={TextField as any}
                                             disabled={!this.props.isAdmin && !this.props.isSelf}
-
                                         />
                                     </Grid>
                                     <Grid item sm={12}>