Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move eherkenning eenmanszaak flag to more natural SiteConfiguration #1597

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading