mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Add a new config variable - ALLOW_SPECIAL_EMAIL_DOMAINS to allow special domains for pgAdmin user emails. #6222
This commit is contained in:
parent
38d4728333
commit
53cdc80df2
@ -21,6 +21,7 @@ New features
|
|||||||
************
|
************
|
||||||
|
|
||||||
| `Issue #1900 <https://github.com/pgadmin-org/pgadmin4/issues/1900>`_ - Added feature to restore preferences to their default values.
|
| `Issue #1900 <https://github.com/pgadmin-org/pgadmin4/issues/1900>`_ - Added feature to restore preferences to their default values.
|
||||||
|
| `Issue #6222 <https://github.com/pgadmin-org/pgadmin4/issues/6222>`_ - Add a new config variable - ALLOW_SPECIAL_EMAIL_DOMAINS to allow special domains for pgAdmin user emails.
|
||||||
| `Issue #7293 <https://github.com/pgadmin-org/pgadmin4/issues/7293>`_ - Allow running non-continuous selected SQL code blocks in the query tool.
|
| `Issue #7293 <https://github.com/pgadmin-org/pgadmin4/issues/7293>`_ - Allow running non-continuous selected SQL code blocks in the query tool.
|
||||||
|
|
||||||
Housekeeping
|
Housekeeping
|
||||||
|
@ -400,6 +400,7 @@ SECURITY_EMAIL_SUBJECT_PASSWORD_CHANGE_NOTICE = \
|
|||||||
CHECK_EMAIL_DELIVERABILITY = False
|
CHECK_EMAIL_DELIVERABILITY = False
|
||||||
SECURITY_EMAIL_VALIDATOR_ARGS = \
|
SECURITY_EMAIL_VALIDATOR_ARGS = \
|
||||||
{"check_deliverability": CHECK_EMAIL_DELIVERABILITY}
|
{"check_deliverability": CHECK_EMAIL_DELIVERABILITY}
|
||||||
|
ALLOW_SPECIAL_EMAIL_DOMAINS = []
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# Upgrade checks
|
# Upgrade checks
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import keyring
|
import keyring
|
||||||
|
import email_validator
|
||||||
|
|
||||||
# User configs loaded from config_local, config_distro etc.
|
# User configs loaded from config_local, config_distro etc.
|
||||||
custom_config_settings = {}
|
custom_config_settings = {}
|
||||||
@ -136,4 +137,13 @@ def evaluate_and_patch_config(config: dict) -> dict:
|
|||||||
'SESSION_COOKIE_PATH': os.environ["SCRIPT_NAME"],
|
'SESSION_COOKIE_PATH': os.environ["SCRIPT_NAME"],
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
# Allow special email domains
|
||||||
|
try:
|
||||||
|
email_validator.SPECIAL_USE_DOMAIN_NAMES = [
|
||||||
|
d for d in email_validator.SPECIAL_USE_DOMAIN_NAMES
|
||||||
|
if d not in config.get('ALLOW_SPECIAL_EMAIL_DOMAINS', [])
|
||||||
|
]
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
Loading…
Reference in New Issue
Block a user