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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

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 =