Skip to content

Commit

Permalink
Fix tests failing due to 2FA requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
DeD1rk committed Jun 21, 2024
1 parent 17ebc7b commit e663ef1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion website/thaliawebsite/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ class ThaliaAdminSite(admin.AdminSite):

def has_permission(self, request):
return super().has_permission(request) and (
settings.DEBUG or user_has_device(request.user)
not settings.ADMIN_REQUIRE_2FA or user_has_device(request.user)
)
2 changes: 2 additions & 0 deletions website/thaliawebsite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,3 +1206,5 @@ def show_toolbar(request):
if os.environ.get("MONEYBIRD_ZERO_TAX_RATE_ID")
else None
)

ADMIN_REQUIRE_2FA = setting(development=False, production=True)

0 comments on commit e663ef1

Please sign in to comment.