mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 21:38:24 -04:00
Don’t bother with YAML syntax
Since this file doesn’t have any complicated data types, plain text with one line per domain is fine.
This commit is contained in:
20
app/email_domains.txt
Normal file
20
app/email_domains.txt
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
gov.uk
|
||||||
|
mod.uk
|
||||||
|
mil.uk
|
||||||
|
ddc-mod.org
|
||||||
|
gov.scot
|
||||||
|
parliament.scot
|
||||||
|
parliament.uk
|
||||||
|
nhs.uk
|
||||||
|
nhs.net
|
||||||
|
police.uk
|
||||||
|
scotent.co.uk
|
||||||
|
assembly.wales
|
||||||
|
cjsm.net
|
||||||
|
gov.wales
|
||||||
|
ac.uk
|
||||||
|
sch.uk
|
||||||
|
onevoicewales.wales
|
||||||
|
mtvh.co.uk
|
||||||
|
wmca.org.uk
|
||||||
|
suttonmail.org
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
- gov.uk
|
|
||||||
- mod.uk
|
|
||||||
- mil.uk
|
|
||||||
- ddc-mod.org
|
|
||||||
- gov.scot
|
|
||||||
- parliament.scot
|
|
||||||
- parliament.uk
|
|
||||||
- nhs.uk
|
|
||||||
- nhs.net
|
|
||||||
- police.uk
|
|
||||||
- scotent.co.uk
|
|
||||||
- assembly.wales
|
|
||||||
- cjsm.net
|
|
||||||
- gov.wales
|
|
||||||
- ac.uk
|
|
||||||
- sch.uk
|
|
||||||
- onevoicewales.wales
|
|
||||||
- mtvh.co.uk
|
|
||||||
- wmca.org.uk
|
|
||||||
- suttonmail.org
|
|
||||||
@@ -13,7 +13,6 @@ import ago
|
|||||||
import dateutil
|
import dateutil
|
||||||
import pyexcel
|
import pyexcel
|
||||||
import pyexcel_xlsx
|
import pyexcel_xlsx
|
||||||
import yaml
|
|
||||||
from flask import abort, current_app, redirect, request, session, url_for
|
from flask import abort, current_app, redirect, request, session, url_for
|
||||||
from flask_login import current_user
|
from flask_login import current_user
|
||||||
from notifications_utils.field import Field
|
from notifications_utils.field import Field
|
||||||
@@ -39,10 +38,10 @@ FAILURE_STATUSES = ['failed', 'temporary-failure', 'permanent-failure',
|
|||||||
'technical-failure', 'virus-scan-failed', 'validation-failed']
|
'technical-failure', 'virus-scan-failed', 'validation-failed']
|
||||||
REQUESTED_STATUSES = SENDING_STATUSES + DELIVERED_STATUSES + FAILURE_STATUSES
|
REQUESTED_STATUSES = SENDING_STATUSES + DELIVERED_STATUSES + FAILURE_STATUSES
|
||||||
|
|
||||||
with open('{}/email_domains.yml'.format(
|
with open('{}/email_domains.txt'.format(
|
||||||
os.path.dirname(os.path.realpath(__file__))
|
os.path.dirname(os.path.realpath(__file__))
|
||||||
)) as email_domains:
|
)) as email_domains:
|
||||||
GOVERNMENT_EMAIL_DOMAIN_NAMES = yaml.safe_load(email_domains)
|
GOVERNMENT_EMAIL_DOMAIN_NAMES = [line.strip() for line in email_domains]
|
||||||
|
|
||||||
|
|
||||||
def user_has_permissions(*permissions, **permission_kwargs):
|
def user_has_permissions(*permissions, **permission_kwargs):
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ PyJWT==1.7.1
|
|||||||
PyPDF2==1.26.0
|
PyPDF2==1.26.0
|
||||||
python-dateutil==2.8.0
|
python-dateutil==2.8.0
|
||||||
python-json-logger==0.1.10
|
python-json-logger==0.1.10
|
||||||
PyYAML==3.13
|
|
||||||
redis==3.2.1
|
redis==3.2.1
|
||||||
requests==2.22.0
|
requests==2.22.0
|
||||||
rsa==3.4.2
|
rsa==3.4.2
|
||||||
|
|||||||
Reference in New Issue
Block a user