A platform admin user is able to see a list of all services.

Each service on the list is linked to the dashboard page of the service.
The platform admin user can see/edit templates, see/invite users, see/edit service settings.
The platform admin user can not send messages, see/edit api keys and developer docs.
This commit is contained in:
Rebecca Law
2016-03-17 10:46:47 +00:00
parent cc15d92aaa
commit b28fbc16d7
22 changed files with 154 additions and 104 deletions

View File

@@ -2,14 +2,14 @@ from __future__ import unicode_literals
from notifications_python_client.notifications import NotificationsAPIClient
class NotificationsAdminAPIClient(NotificationsAPIClient):
class ServiceAPIClient(NotificationsAPIClient):
# Fudge assert in the super __init__ so
# we can set those variables later.
def __init__(self):
super(NotificationsAdminAPIClient, self).__init__("api_url",
"client",
"secret")
super(ServiceAPIClient, self).__init__("api_url",
"client",
"secret")
def init_app(self, application):
self.base_url = application.config['API_HOST_NAME']
@@ -128,21 +128,3 @@ class NotificationsAdminAPIClient(NotificationsAPIClient):
"""
endpoint = "/service/{0}/template/{1}".format(service_id, template_id)
return self.delete(endpoint)
# The implementation of these will change after the notifications-api
# functionality updates to include the ability to send notifications.
def send_sms(self,
mobile_number,
message,
job_id=None,
description=None):
self.send_sms_notification(mobile_number, message)
def send_email(self,
email_address,
message,
from_address,
subject,
job_id=None,
description=None):
self.send_email_notification(email_address, message, from_address, subject)