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

@@ -15,7 +15,7 @@ from app.utils import user_has_permissions
@main.route("/services/<service_id>/dashboard")
@login_required
@user_has_permissions()
@user_has_permissions('view_activity', admin_override=True)
def service_dashboard(service_id):
templates = templates_dao.get_service_templates(service_id)['data']
jobs = job_api_client.get_job(service_id)['data']