Skip to content

Commit

Permalink
bug fix SAML_LOGIN_ENABLED setting logic (getredash#5784)
Browse files Browse the repository at this point in the history
  • Loading branch information
ism-k authored Feb 17, 2023
1 parent 82361e7 commit d6dbc64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion redash/settings/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
SAML_SSO_URL = os.environ.get("REDASH_SAML_SSO_URL", "")
SAML_X509_CERT = os.environ.get("REDASH_SAML_X509_CERT", "")
SAML_SP_SETTINGS = os.environ.get("REDASH_SAML_SP_SETTINGS", "")
SAML_LOGIN_ENABLED = SAML_SSO_URL != "" and SAML_METADATA_URL != ""
if SAML_LOGIN_TYPE == "static":
SAML_LOGIN_ENABLED = SAML_SSO_URL != "" and SAML_METADATA_URL != ""
else:
SAML_LOGIN_ENABLED = SAML_METADATA_URL != ""

DATE_FORMAT = os.environ.get("REDASH_DATE_FORMAT", "DD/MM/YY")
TIME_FORMAT = os.environ.get("REDASH_TIME_FORMAT", "HH:mm")
Expand Down

0 comments on commit d6dbc64

Please sign in to comment.