mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-04 08:01:34 -04:00
blunt rename of org (#620)
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
from app.models.organisation import Organisation
|
||||
from app.models.organization import Organization
|
||||
|
||||
NHS_EMAIL_BRANDING_ID = 'a7dc4e56-660b-4db7-8cff-12c37b12b5ea'
|
||||
|
||||
|
||||
def get_email_choices(service):
|
||||
organisation_branding_id = service.organisation.email_branding_id if service.organisation else None
|
||||
organization_branding_id = service.organization.email_branding_id if service.organization else None
|
||||
|
||||
if (
|
||||
service.organisation_type == Organisation.TYPE_FEDERAL
|
||||
service.organization_type == Organization.TYPE_FEDERAL
|
||||
and service.email_branding_id is not None # GOV.UK is not current branding
|
||||
and organisation_branding_id is None # no default to supersede it (GOV.UK)
|
||||
and organization_branding_id is None # no default to supersede it (GOV.UK)
|
||||
):
|
||||
yield ('govuk', 'GOV.UK')
|
||||
|
||||
if (
|
||||
service.organisation_type == Organisation.TYPE_FEDERAL
|
||||
and service.organisation
|
||||
and organisation_branding_id is None # don't offer both if org has default
|
||||
and service.email_branding_name.lower() != f'GOV.UK and {service.organisation.name}'.lower()
|
||||
service.organization_type == Organization.TYPE_FEDERAL
|
||||
and service.organization
|
||||
and organization_branding_id is None # don't offer both if org has default
|
||||
and service.email_branding_name.lower() != f'GOV.UK and {service.organization.name}'.lower()
|
||||
):
|
||||
yield ('govuk_and_org', f'GOV.UK and {service.organisation.name}')
|
||||
yield ('govuk_and_org', f'GOV.UK and {service.organization.name}')
|
||||
|
||||
@@ -4,7 +4,7 @@ from flask import abort, current_app
|
||||
from flask_login import current_user, login_required
|
||||
|
||||
from app import config
|
||||
from app.notify_client.organisations_api_client import organisations_client
|
||||
from app.notify_client.organizations_api_client import organizations_client
|
||||
|
||||
user_is_logged_in = login_required
|
||||
|
||||
@@ -48,7 +48,7 @@ def is_gov_user(email_address):
|
||||
return _email_address_ends_with(
|
||||
email_address, config.Config.GOVERNMENT_EMAIL_DOMAIN_NAMES
|
||||
) or _email_address_ends_with(
|
||||
email_address, organisations_client.get_domains()
|
||||
email_address, organizations_client.get_domains()
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user