diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-05-05 16:36:42 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-05 16:36:42 -0400 |
commit | f2e788f4b12517759e016a9f48633597bed82e8f (patch) | |
tree | b1881587688460d4f122f012e4f6e0356857f902 /webapp/components/admin_console/reset_password_modal.jsx | |
parent | d2ddf40f56191c1770c3ca93d747a7f1b749f26c (diff) | |
download | chat-f2e788f4b12517759e016a9f48633597bed82e8f.tar.gz chat-f2e788f4b12517759e016a9f48633597bed82e8f.tar.bz2 chat-f2e788f4b12517759e016a9f48633597bed82e8f.zip |
Allow system admins to switch user accounts to email/password (#2893)
Diffstat (limited to 'webapp/components/admin_console/reset_password_modal.jsx')
-rw-r--r-- | webapp/components/admin_console/reset_password_modal.jsx | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/webapp/components/admin_console/reset_password_modal.jsx b/webapp/components/admin_console/reset_password_modal.jsx index 5133f3f28..c383a4fb8 100644 --- a/webapp/components/admin_console/reset_password_modal.jsx +++ b/webapp/components/admin_console/reset_password_modal.jsx @@ -58,7 +58,8 @@ class ResetPasswordModal extends React.Component { } render() { - if (this.props.user == null) { + const user = this.props.user; + if (user == null) { return <div/>; } @@ -70,6 +71,23 @@ class ResetPasswordModal extends React.Component { serverError = <div className='form-group has-error'><p className='input__help error'>{this.state.serverError}</p></div>; } + let title; + if (user.auth_service) { + title = ( + <FormattedMessage + id='admin.reset_password.titleSwitch' + defaultMessage='Switch Account to Email/Password' + /> + ); + } else { + title = ( + <FormattedMessage + id='admin.reset_password.titleReset' + defaultMessage='Reset Password' + /> + ); + } + return ( <Modal show={this.props.show} @@ -77,10 +95,7 @@ class ResetPasswordModal extends React.Component { > <Modal.Header closeButton={true}> <Modal.Title> - <FormattedMessage - id='admin.reset_password.title' - defaultMessage='Reset Password' - /> + {title} </Modal.Title> </Modal.Header> <form |