Skip to content

Commit

Permalink
Merge pull request #2034 from DemocracyClub/basic-auth-on-dev-and-stage
Browse files Browse the repository at this point in the history
Basic auth on dev and stage
  • Loading branch information
symroe authored Aug 9, 2024
2 parents 8e623fc + 61596b0 commit 1af63ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ icalendar==5.0.7
dealer==2.1.0

git+https://github.com/DemocracyClub/design-system.git@0.5.0
git+https://github.com/DemocracyClub/dc_django_utils.git@6.0.3
git+https://github.com/DemocracyClub/dc_django_utils.git@6.1.0
https://github.com/DemocracyClub/dc_logging/archive/refs/tags/1.0.1.tar.gz

djangorestframework-jsonp==1.0.2
Expand Down
6 changes: 3 additions & 3 deletions wcivf/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def repo_root(*x):
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"django.middleware.security.SecurityMiddleware",
"core.middleware.UTMTrackerMiddleware",
"dc_utils.middleware.BasicAuthMiddleware",
)

MIDDLEWARE = whitenoise_add_middleware(MIDDLEWARE)
Expand Down Expand Up @@ -164,7 +165,6 @@ def repo_root(*x):
if os.environ.get("DC_ENVIRONMENT") in ["production"]:
DATABASE_ROUTERS.append("core.db_routers.FeedbackRouter")


if not os.environ.get("IGNORE_ROUTERS") and os.environ.get(
"RDS_DB_NAME", False
):
Expand Down Expand Up @@ -211,7 +211,6 @@ def repo_root(*x):
extra_js=["feedback/js/feedback_form.js"],
)


PIPELINE["SASS_ARGUMENTS"] += (
" -I " + dc_design_system.DC_SYSTEM_PATH + "/system"
)
Expand Down Expand Up @@ -303,6 +302,8 @@ def repo_root(*x):
"https://developers.environments.womblelabs.co.uk/api/v1/layers_of_state/"
)

BASIC_AUTH_ALLOWLIST = ["/_status_check/"]

with contextlib.suppress(ImportError):
# .local.py overrides all the common settings.
from .local import * # noqa
Expand All @@ -311,7 +312,6 @@ def repo_root(*x):
INSTALLED_APPS += ("debug_toolbar",)
MIDDLEWARE += ("debug_toolbar.middleware.DebugToolbarMiddleware",)


if os.environ.get("CIRCLECI"):
with contextlib.suppress(ImportError):
from .ci import * # noqa

0 comments on commit 1af63ec

Please sign in to comment.