FIX: 2fa check error for anon users (#27924)

This commit is contained in:
David Taylor
2024-07-15 14:19:04 +01:00
committed by GitHub
parent d32675ace2
commit 0b7099f34e

View File

@@ -43,7 +43,7 @@ export default class RestrictedRouting extends Service {
// methods in ApplicationController.
const enforcing2fa =
(this.siteSettings.enforce_second_factor === "staff" &&
this.currentUser.staff) ||
this.currentUser?.staff) ||
this.siteSettings.enforce_second_factor === "all";
const exemptedFrom2faEnforcement =