Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not show 2FA settings if the user has no providers available #25273

Merged

Conversation

ChristophWurst
Copy link
Member

Fixes #13971

To test install a 2FA provider, then you will see the 2FA settings as a user. Once there is only the backup codes one left, the settings vanish.

return true;
}
}
return false;
Copy link
Member

Choose a reason for hiding this comment

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

What about if the backupprovider is the onyl provider but it is still enabled?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to explain this on L97-98. If the backup codes provider is the only one, then we don't show the settings neither.

But now that I think about it maybe we should only hide this if there is no provide other than the backup provider and 2FA is not enforced.

Users who have it enforced should see the backup code provider settings.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@ChristophWurst ChristophWurst force-pushed the enhancement/hide-two-factor-settings-if-no-providers branch from 36c6da6 to d382146 Compare January 22, 2021 11:21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst ChristophWurst force-pushed the enhancement/hide-two-factor-settings-if-no-providers branch from d382146 to 378f116 Compare January 22, 2021 12:55
@rullzer rullzer mentioned this pull request Jan 22, 2021
19 tasks
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Tested and works 👍

@MorrisJobke MorrisJobke merged commit 1d2707a into master Jan 22, 2021
@MorrisJobke MorrisJobke deleted the enhancement/hide-two-factor-settings-if-no-providers branch January 22, 2021 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Personal Two-Factor Authentication settings visible even if no 2FA activated
3 participants