-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
37 additions
and
95 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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
from digid_eherkenning.models.digid import DigidConfiguration | ||
from digid_eherkenning.models.eherkenning import EherkenningConfiguration | ||
from digid_eherkenning.models import DigidConfiguration, EherkenningConfiguration | ||
|
||
ADDITIONAL_CSP_VALUES = { | ||
"digid": "https://digid.nl https://*.digid.nl", | ||
"eherkenning": "", | ||
} | ||
|
||
CONFIG_TYPES = { | ||
DigidConfiguration: "digid", | ||
EherkenningConfiguration: "eherkenning", | ||
DigidConfiguration: "https://digid.nl https://*.digid.nl", | ||
EherkenningConfiguration: "", | ||
} |
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 |
---|---|---|
@@ -1,19 +1,14 @@ | ||
from django.db.models.signals import post_save | ||
from django.dispatch import receiver | ||
|
||
from digid_eherkenning.models.digid import DigidConfiguration | ||
from digid_eherkenning.models.eherkenning import EherkenningConfiguration | ||
from digid_eherkenning.models import DigidConfiguration, EherkenningConfiguration | ||
|
||
from openforms.contrib.digid_eherkenning.utils import ( | ||
create_digid_eherkenning_csp_settings, | ||
) | ||
|
||
from .constants import CONFIG_TYPES | ||
from .utils import create_digid_eherkenning_csp_settings | ||
|
||
|
||
@receiver(post_save, sender=DigidConfiguration) | ||
@receiver(post_save, sender=EherkenningConfiguration) | ||
def trigger_csp_update( | ||
sender, instance: DigidConfiguration | EherkenningConfiguration, **kwargs | ||
): | ||
create_digid_eherkenning_csp_settings(instance, CONFIG_TYPES[type(instance)]) | ||
create_digid_eherkenning_csp_settings(instance) |
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