mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
enable broadcast org in all environments
This organisation is defined in the config file. It's hard coded to a UUID as defined in the api db migration 0331_add_broadcast_org.
This commit is contained in:
@@ -84,7 +84,8 @@ class Config(object):
|
||||
ASSET_DOMAIN = ''
|
||||
ASSET_PATH = '/static/'
|
||||
|
||||
BROADCAST_ORGANISATION_ID = os.environ.get('BROADCAST_ORGANISATION_ID')
|
||||
# as defined in api db migration 0331_add_broadcast_org.py
|
||||
BROADCAST_ORGANISATION_ID = '38e4bf69-93b0-445d-acee-53ea53fe02df'
|
||||
|
||||
NOTIFY_SERVICE_ID = 'd6aa2c68-a2d9-4437-ab19-3ae8eb202553'
|
||||
|
||||
@@ -179,8 +180,6 @@ class Live(Config):
|
||||
ASSET_DOMAIN = 'static.notifications.service.gov.uk'
|
||||
ASSET_PATH = 'https://static.notifications.service.gov.uk/'
|
||||
|
||||
BROADCAST_ORGANISATION_ID = '38e4bf69-93b0-445d-acee-53ea53fe02df'
|
||||
|
||||
|
||||
class CloudFoundryConfig(Config):
|
||||
pass
|
||||
|
||||
@@ -104,11 +104,10 @@ class Service(JSONModel):
|
||||
set(self.permissions) - {'email', 'sms', 'letter'} | {'broadcast'}
|
||||
)
|
||||
broadcast_org_id = current_app.config['BROADCAST_ORGANISATION_ID']
|
||||
if broadcast_org_id:
|
||||
organisations_client.update_service_organisation(
|
||||
service_id=self.id,
|
||||
org_id=broadcast_org_id
|
||||
)
|
||||
organisations_client.update_service_organisation(
|
||||
service_id=self.id,
|
||||
org_id=broadcast_org_id
|
||||
)
|
||||
return ret
|
||||
|
||||
def update_permissions(self, permissions):
|
||||
|
||||
Reference in New Issue
Block a user