mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-04 08:01:34 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user