-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#2975] Move option to fetch eHerkenning zaken with RSIN to ZGW API g…
…roup config
- Loading branch information
Showing
19 changed files
with
135 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...n_inwoner/openzaak/migrations/0060_zgwapigroupconfig_fetch_eherkenning_zaken_with_rsin.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Generated by Django 4.2.16 on 2025-01-23 11:13 | ||
|
||
import logging | ||
|
||
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist | ||
from django.db import migrations, models | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def migrate_fetch_eherkenning_zaken_with_rsin(apps, _): | ||
OpenZaakConfig = apps.get_model("openzaak", "OpenZaakConfig") | ||
ZGWApiGroupConfig = apps.get_model("openzaak", "ZGWApiGroupConfig") | ||
|
||
try: | ||
zgw_group_config = ZGWApiGroupConfig.objects.get() | ||
except ObjectDoesNotExist: | ||
logger.info( | ||
"No zgw_api_group_config found. " | ||
"Skipping migration of fetch_eherkenning_zaken_with_rsin" | ||
) | ||
return | ||
except MultipleObjectsReturned: | ||
logger.info( | ||
"Multiple zgw_api_group_config instances found. " | ||
"Skipping migration of fetch_eherkenning_zaken_with_rsin" | ||
) | ||
return | ||
|
||
zaak_config = OpenZaakConfig.objects.first() | ||
|
||
zgw_group_config.fetch_eherkenning_zaken_with_rsin = ( | ||
zaak_config.fetch_eherkenning_zaken_with_rsin | ||
) | ||
zgw_group_config.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("openzaak", "0059_openzaakconfig_show_cases_without_status"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="zgwapigroupconfig", | ||
name="fetch_eherkenning_zaken_with_rsin", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="If enabled, Zaken for eHerkenning users are fetched using the company RSIN (Open Zaak). If not enabled, Zaken are fetched using the KvK number (eSuite).", | ||
verbose_name="Fetch Zaken for users authenticated with eHerkenning using RSIN", | ||
), | ||
), | ||
migrations.RunPython( | ||
code=migrate_fetch_eherkenning_zaken_with_rsin, | ||
reverse_code=migrations.RunPython.noop, | ||
), | ||
migrations.RemoveField( | ||
model_name="openzaakconfig", | ||
name="fetch_eherkenning_zaken_with_rsin", | ||
), | ||
] |
16 changes: 16 additions & 0 deletions
16
src/open_inwoner/openzaak/migrations/0061_merge_20250124_1149.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Generated by Django 4.2.16 on 2025-01-24 10:49 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
( | ||
"openzaak", | ||
"0060_remove_openzaakconfig_use_zaak_omschrijving_as_title_and_more", | ||
), | ||
("openzaak", "0060_zgwapigroupconfig_fetch_eherkenning_zaken_with_rsin"), | ||
] | ||
|
||
operations = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.