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

[MM-14746] Show Remove MFA Item in System Console only for Users that enabled MFA #2602

Merged
merged 2 commits into from
Apr 4, 2019

Conversation

DSchalla
Copy link
Member

@DSchalla DSchalla commented Apr 3, 2019

Summary

Currently the Remove MFA option is always shown in the User Dropdown in the system console. The PR fixes that non-boolean types are passed a show prop, since when mfa_active is false the property is not send to the client, so user.mfa_active === undefined, and undefined is for show === true.

Ticket Link

https://mattermost.atlassian.net/projects/MM/issues/MM-14746

@DSchalla DSchalla added 2: Dev Review Requires review by a core commiter CherryPick/Candidate A candidate for a quality or patch release, but not yet approved labels Apr 3, 2019
@DSchalla DSchalla added this to the v5.10.0 milestone Apr 3, 2019
@DSchalla DSchalla self-assigned this Apr 3, 2019
@DSchalla DSchalla requested review from jespino and sudheerDev April 3, 2019 11:49
@DSchalla DSchalla changed the title Show Remove MFA Item in System Console only for Users that enabled MFA [MM-14746] Show Remove MFA Item in System Console only for Users that enabled MFA Apr 3, 2019
Copy link
Member

@jespino jespino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This was a tricky one, took me some time to understand why the Boolean coercion was needed.

@amyblais amyblais added CherryPick/Approved Meant for the quality or patch release tracked in the milestone and removed CherryPick/Candidate A candidate for a quality or patch release, but not yet approved labels Apr 3, 2019
@sudheerDev sudheerDev added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Apr 3, 2019
@DSchalla DSchalla merged commit 09cdfde into master Apr 4, 2019
@DSchalla DSchalla deleted the MM-14746 branch April 4, 2019 08:46
DSchalla added a commit that referenced this pull request Apr 4, 2019
… enabled MFA (#2602)

* Ensure show prop is always of type bool to avoid unintentional items to be shown

* Use explicit coercion
@DSchalla DSchalla added CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone and removed CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Apr 4, 2019
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Changelog/Done Required changelog entry has been written and removed Changelog/Not Needed Does not require a changelog entry labels Apr 4, 2019
@DHaussermann DHaussermann added the Tests/Done Release tests have been written label Apr 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Done Required changelog entry has been written CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone Docs/Not Needed Does not require documentation Tests/Done Release tests have been written
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants