Feature/enrollment onboarding - #966
Draft
PassionateBytes wants to merge 11 commits into
Draft
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Add tests for role-based Two-Factor enforcement
Enforcement currently challenges users who have not configured Two-Factor with an emailed code. That keeps the login flow intact, but it never asks those users to configure a second factor of their own choosing. This adds an enforcement method setting next to the enforced roles. The email method stays the default and is unchanged. The enrollment method instead sends users in an enforced role to a setup screen after they log in, and keeps the rest of the admin unavailable until they have enabled a method. The setup screen renders the provider UI of the profile screen and saves through Two_Factor_Core::user_two_factor_options_update(), so providers configure themselves exactly as they do on the profile screen. The profile screen itself, the endpoints the providers post to, and the plugin's own REST routes stay reachable while the enrollment is pending; other REST requests are refused. Fixes WordPress#813
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Fixes #
Why?
How?
Use of AI Tools
Testing Instructions
Screenshots or screencast
Changelog Entry