Skip to content

Commit c15e3be

Browse files
committed
feat: add password login allowlist
Bump django-helusers to allow defined usernames to log in using the password login. Refs: PT-1987
1 parent 6727c05 commit c15e3be

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

palvelutarjotin/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
HELUSERS_BACK_CHANNEL_LOGOUT_ENABLED=(bool, False),
9696
HELUSERS_USER_MIGRATE_ENABLED=(bool, False),
9797
HELUSERS_PASSWORD_LOGIN_DISABLED=(bool, True),
98+
HELUSERS_PASSWORD_LOGIN_ALLOWLIST=(list, []),
9899
TOKEN_AUTH_BROWSER_TEST_JWT_256BIT_SIGN_SECRET=(str, ""),
99100
TOKEN_AUTH_BROWSER_TEST_JWT_ISSUER=(list, []),
100101
TOKEN_AUTH_BROWSER_TEST_ENABLED=(bool, False),
@@ -571,6 +572,7 @@ def sentry_traces_sampler(sampling_context: SamplingContext) -> float:
571572
)
572573
# A boolean that disables/enables Django admin password login
573574
HELUSERS_PASSWORD_LOGIN_DISABLED = env.bool("HELUSERS_PASSWORD_LOGIN_DISABLED")
575+
HELUSERS_PASSWORD_LOGIN_ALLOWLIST = env("HELUSERS_PASSWORD_LOGIN_ALLOWLIST")
574576

575577
# Load auditlog settings
576578
from palvelutarjotin.auditlog_settings import * # noqa: E402, F403

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,9 @@ django-helsinki-health-endpoints==1.0.0 \
387387
--hash=sha256:75670113e99bfd1fc23e317a3a22cff563140f495655c2a5f6ab219389dafd52 \
388388
--hash=sha256:eebf1baa6917d7b0e11123aec191df773883102ec1653025a86d7037dba389e2
389389
# via -r requirements.in
390-
django-helusers==1.0.0 \
391-
--hash=sha256:0e33e238347a4088927675574a7dad179ee1f9d9e958daecfa4862ad6f63f79c \
392-
--hash=sha256:c18ff8ff0ff8fb72c2b802e005c680d4d477273b705a5c524aaff31c665d8e25
390+
django-helusers==1.1.0 \
391+
--hash=sha256:5d6c4d0db11db633a031cfdcef6e754fb26c167d3e179d77882c2edecca60830 \
392+
--hash=sha256:73ef1c9f3050cbb3a4f3a35264f26807f60a00b66eef31d8b07cd1ffd61de965
393393
# via
394394
# -r requirements.in
395395
# helsinki-profile-gdpr-api

0 commit comments

Comments
 (0)