From f2e788f4b12517759e016a9f48633597bed82e8f Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 5 May 2016 16:36:42 -0400 Subject: Allow system admins to switch user accounts to email/password (#2893) --- .../admin_console/reset_password_modal.jsx | 25 ++++++++--- webapp/components/admin_console/user_item.jsx | 48 ++++++++++++++++------ 2 files changed, 56 insertions(+), 17 deletions(-) (limited to 'webapp/components/admin_console') 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
; } @@ -70,6 +71,23 @@ class ResetPasswordModal extends React.Component { serverError =

{this.state.serverError}

; } + let title; + if (user.auth_service) { + title = ( + + ); + } else { + title = ( + + ); + } + return ( - + {title}
); + + passwordReset = ( +
  • + + + +
  • + ); } else { authServiceText = ( ); + + passwordReset = ( +
  • + + + +
  • + ); + } + + if (global.window.mm_config.EnableSignInWithEmail !== 'true') { + passwordReset = null; } const me = UserStore.getCurrentUser(); @@ -474,18 +509,7 @@ export default class UserItem extends React.Component { {makeNotActive} {makeSystemAdmin} {mfaReset} -
  • - - - -
  • + {passwordReset}
    -- cgit v1.2.3-1-g7c22