Skip to content

Commit

Permalink
💚 [#3049] Address missing coverage
Browse files Browse the repository at this point in the history
* dev-settings coverage is not relevant
* admin-index menu check is obsolete due to the hidden navbar at the
  template level
  • Loading branch information
sergei-maertens committed Feb 7, 2024
1 parent dff6ddb commit 34491b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/openforms/conf/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
CSP_EXCLUDE_URL_PREFIXES += ("/dev/",)

# None of the authentication backends require two-factor authentication.
if config("DISABLE_2FA", default=True):
if config("DISABLE_2FA", default=True): # pragma: no cover
MAYKIN_2FA_ALLOW_MFA_BYPASS_BACKENDS = AUTHENTICATION_BACKENDS

# THOU SHALT NOT USE NAIVE DATETIMES
Expand Down
5 changes: 0 additions & 5 deletions src/openforms/utils/django_two_factor_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,5 @@

def should_display_dropdown_menu(request) -> bool:
default = default_should_display_dropdown_menu(request)

# never display the dropdown in two-factor admin views
if request.resolver_match.view_name.startswith("maykin_2fa:"):
return False

# do not display the dropdown until the user is verified.
return default and request.user.is_verified()

0 comments on commit 34491b3

Please sign in to comment.