|
19 | 19 | from django.core.exceptions import ImproperlyConfigured |
20 | 20 | from dynaconf import DjangoDynaconf, Dynaconf, Validator |
21 | 21 | from dynaconf.base import Settings |
22 | | -from dynaconf.utils.functional import empty |
23 | 22 |
|
24 | 23 | from pulpcore import constants |
25 | 24 |
|
@@ -608,21 +607,22 @@ def otel_middleware_hook(settings): |
608 | 607 |
|
609 | 608 | def saml2_settings_hook(settings): |
610 | 609 | data = {"dynaconf_merge": True} |
611 | | - if "LOGIN_URL" not in settings: |
612 | | - data["LOGIN_URL"] = "/saml2/login/" |
613 | | - if "SESSION_COOKIE_SECURE" not in settings: |
614 | | - data["SESSION_COOKIE_SECURE"] = True |
615 | | - if "SESSION_EXPIRE_AT_BROWSER_CLOSE" not in settings: |
616 | | - data["SESSION_EXPIRE_AT_BROWSER_CLOSE"] = True |
617 | 610 | if "SAML_CONFIG" in settings: |
618 | 611 | data["INSTALLED_APPS"] = ["djangosaml2"] |
619 | 612 | data["MIDDLEWARE"] = ["djangosaml2.middleware.SamlSessionMiddleware"] |
620 | 613 | data["AUTHENTICATION_BACKENDS"] = ["djangosaml2.backends.Saml2Backend"] |
| 614 | + if "LOGIN_URL" not in settings: |
| 615 | + data["LOGIN_URL"] = "/saml2/login/" |
| 616 | + if "SESSION_COOKIE_SECURE" not in settings: |
| 617 | + data["SESSION_COOKIE_SECURE"] = True |
| 618 | + if "SESSION_EXPIRE_AT_BROWSER_CLOSE" not in settings: |
| 619 | + data["SESSION_EXPIRE_AT_BROWSER_CLOSE"] = True |
621 | 620 | return data |
622 | 621 |
|
623 | 622 |
|
624 | 623 | del preload_settings |
625 | 624 |
|
| 625 | + |
626 | 626 | class PulpSettings(Settings): |
627 | 627 | def _ready(self): |
628 | 628 | self._store = self._store.to_dict() |
|
0 commit comments