cleaning up outdated phrases

This commit is contained in:
Hossein Shafagh
2020-10-09 18:04:16 -07:00
parent 1d18f061f2
commit 770339f94c
6 changed files with 16 additions and 16 deletions

View File

@ -22,7 +22,7 @@ def common_name(value):
def sensitive_domain(domain):
"""
Checks if user has the admin role, the domain does not match sensitive domains and whitelisted domain patterns.
Checks if user has the admin role, the domain does not match sensitive domains and allowed domain patterns.
:param domain: domain name (str)
:return:
"""
@ -30,10 +30,10 @@ def sensitive_domain(domain):
# User has permission, no need to check anything
return
whitelist = current_app.config.get("LEMUR_WHITELISTED_DOMAINS", [])
if whitelist and not any(re.match(pattern, domain) for pattern in whitelist):
allowlist = current_app.config.get("LEMUR_ALLOWED_DOMAINS", [])
if allowlist and not any(re.match(pattern, domain) for pattern in allowlist):
raise ValidationError(
"Domain {0} does not match whitelisted domain patterns. "
"Domain {0} does not match allowed domain patterns. "
"Contact an administrator to issue the certificate.".format(domain)
)