Skip to content

Commit

Permalink
Merge pull request #1597 from maykinmedia/move-eenmanszaak-eherkennin…
Browse files Browse the repository at this point in the history
…g-login-flag

Move eherkenning eenmanszaak flag to more natural SiteConfiguration
  • Loading branch information
swrichards authored Feb 4, 2025
2 parents 8c69698 + 992f90f commit d51795d
Show file tree
Hide file tree
Showing 10 changed files with 454 additions and 373 deletions.
5 changes: 2 additions & 3 deletions src/open_inwoner/accounts/tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from open_inwoner.kvk.branches import get_kvk_branch_number
from open_inwoner.kvk.tests.factories import CertificateFactory
from open_inwoner.openklant.tests.data import MockAPIReadPatchData
from open_inwoner.openzaak.models import OpenZaakConfig
from open_inwoner.utils.tests.helpers import AssertTimelineLogMixin

from ...cms.collaborate.cms_apps import CollaborateApphook
Expand Down Expand Up @@ -677,7 +676,7 @@ def test_login_as_eenmanszaak_blocked_if_enable_eherkenning_for_eenmanszaak_is_f
mock_retrieve_rsin_with_kvk,
mock_get_basisprofiel,
):
config = OpenZaakConfig.get_solo()
config = SiteConfiguration.get_solo()
config.enable_eherkenning_for_eenmanszaak = False
config.save()

Expand Down Expand Up @@ -722,7 +721,7 @@ def test_login_as_eenmanszaak_not_blocked_if_enable_eherkenning_for_eenmanszaak_
mock_retrieve_rsin_with_kvk,
mock_get_basisprofiel,
):
config = OpenZaakConfig.get_solo()
config = SiteConfiguration.get_solo()
config.enable_eherkenning_for_eenmanszaak = True
config.save()

Expand Down
4 changes: 2 additions & 2 deletions src/open_inwoner/accounts/views/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
from eherkenning.mock.views.eherkenning import (
eHerkenningAssertionConsumerServiceMockView,
)
from open_inwoner.configurations.models import SiteConfiguration
from open_inwoner.kvk.client import KvKClient
from open_inwoner.openzaak.models import OpenZaakConfig
from open_inwoner.utils.views import LogMixin

from ..choices import LoginTypeChoices
Expand Down Expand Up @@ -137,7 +137,7 @@ class BlockEenmanszaakLoginMixin:
def get(self, request):
response = super().get(request)

config = OpenZaakConfig.get_solo()
config = SiteConfiguration.get_solo()
if config.enable_eherkenning_for_eenmanszaak:
return response

Expand Down
Binary file modified src/open_inwoner/conf/locale/nl/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit d51795d

Please sign in to comment.