With the addition of has_permissions on the dashboard, jobs, and manage_users pages a platform admin user or a users with no permissions on the service could no longer see the page.

A new permission has been added, view_activity, to resolve this issue.
Another pull request in notifications-admin will be required to update all users with a default permission of view_activity.
This commit is contained in:
Rebecca Law
2016-03-29 13:23:36 +01:00
parent 8a55e61dac
commit b79901fe28
7 changed files with 47 additions and 21 deletions

View File

@@ -66,7 +66,11 @@ def get_page_headings(template_type):
@main.route("/services/<service_id>/send/<template_type>", methods=['GET'])
@login_required
@user_has_permissions('send_texts', 'send_emails', 'send_letters', 'manage_templates', 'manage_api_keys',
@user_has_permissions('view_activity',
'send_texts',
'send_emails',
'manage_templates',
'manage_api_keys',
admin_override=True, or_=True)
def choose_template(service_id, template_type):