Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Ensure show prop is always of type bool to avoid unintentional items …
Browse files Browse the repository at this point in the history
…to be shown
  • Loading branch information
DSchalla committed Apr 3, 2019
1 parent 56613c6 commit 31c8e67
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ export default class SystemUsersDropdown extends React.Component {
let showMakeNotActive = !Utils.isSystemAdmin(user.roles);
let showManageTeams = true;
let showRevokeSessions = true;
const showMfaReset = this.props.mfaEnabled && user.mfa_active && !user.is_bot;
const showMfaReset = this.props.mfaEnabled && !!user.mfa_active && !user.is_bot;

if (user.delete_at > 0) {
currentRoles = (
Expand Down Expand Up @@ -410,7 +410,7 @@ export default class SystemUsersDropdown extends React.Component {
text={Utils.localizeMessage('admin.user_item.resetMfa', 'Remove MFA')}
/>
<MenuItemAction
show={user.auth_service && this.props.experimentalEnableAuthenticationTransfer && !user.is_bot}
show={!!user.auth_service && this.props.experimentalEnableAuthenticationTransfer && !user.is_bot}
onClick={this.handleResetPassword}
text={Utils.localizeMessage('admin.user_item.switchToEmail', 'Switch to Email/Password')}
/>
Expand Down

0 comments on commit 31c8e67

Please sign in to comment.