From 604a45b5c00e6c705a920508ae3533083fa9ffe4 Mon Sep 17 00:00:00 2001 From: matkaczmarek Date: Mon, 28 Oct 2024 10:41:48 +0100 Subject: [PATCH] Add feature flag to enable/disable orcid login --- .env.example | 1 + physionet-django/physionet/settings/base.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index eaf8420d5e..bc71dbb0d9 100644 --- a/.env.example +++ b/.env.example @@ -103,6 +103,7 @@ ORCID_REDIRECT_URI=http://localhost:8000/authorcid ORCID_CLIENT_ID=SECRET ORCID_CLIENT_SECRET=SECRET ORCID_SCOPE='/read-limited,/activities/update' +ORCID_LOGIN_ENABLED=True STORAGE_TYPE=LOCAL diff --git a/physionet-django/physionet/settings/base.py b/physionet-django/physionet/settings/base.py index d86e01fea7..04d48dfff4 100644 --- a/physionet-django/physionet/settings/base.py +++ b/physionet-django/physionet/settings/base.py @@ -287,7 +287,7 @@ ORCID_CLIENT_ID = config('ORCID_CLIENT_ID', default=False) ORCID_CLIENT_SECRET = config('ORCID_CLIENT_SECRET', default=False) ORCID_SCOPE = config('ORCID_SCOPE', default=False) -ORCID_LOGIN_ENABLED = "openid" in ORCID_SCOPE +ORCID_LOGIN_ENABLED = config('ORCID_LOGIN_ENABLED', default=("openid" in ORCID_SCOPE)) ORCID_OPEN_ID_JWKS_URL = config('ORCID_OPEN_ID_JWKS_URL', default=False) # Tags for the CITISOAPService API