-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX Backport EnforcementManager fixes to 3.0 (#382)
* FIX Members minimal CMS access were previously stuck in a login loop, now redirects to MFA * FIX Check whether user is eligible for MFA in canSkipMFA method Users with no CMS access are not eligible to use MFA by default. This was respected in the shouldRedirectToMFA method, but not in canSkipMFA, which resulted in these users being booted back to the login screen whenever they attempted to log in. This commit also tidies some of the docblocks in EnforcementManager, and adjusts the hasAdminAccess method to always act as the provided Member. * FIX Increase code coverage, correct logic in grace period tests * FIX Add code coverage for EnforcementManager::hasCompletedRegistration * FIX Remove redundant Config nesting in EnforcementManagerTest * FIX Ensure canSkipMFA respects whether MFA is enabled Previously the canSkipMFA method did not validate whether MFA was available, which resulted in a login loop if any other condition stopped the user from skipping, such as MFA being mandated via SiteConfig. * DOCS Add inline explainers to requires_admin_access checks Co-authored-by: Robbie Averill <[email protected]>
- Loading branch information
1 parent
b0210dc
commit 8563416
Showing
3 changed files
with
170 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,12 @@ Member: | |
FirstName: Sammy | ||
Surname: Smith | ||
Email: [email protected] | ||
sully_smith: | ||
FirstName: Sully | ||
Surname: Smith | ||
Email: [email protected] | ||
Groups: =>Group.reportsgroup | ||
HasSkippedMFARegistration: true | ||
reports_user: | ||
FirstName: Reports | ||
Surname: User | ||
|