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
+22 -1
View File
@@ -154,6 +154,27 @@ def test_route_permissions(mocker,
service_one)
def test_route_permissions_for_choose_tempalte(mocker,
app_,
api_user_active,
service_one,
mock_get_service_template):
with app_.test_request_context():
validate_route_permission(
mocker,
app_,
"GET",
200,
url_for(
'main.choose_template',
service_id=service_one['id'],
template_type='sms',
template_id=123),
['view_activity'],
api_user_active,
service_one)
def test_route_invalid_permissions(mocker,
app_,
api_user_active,
@@ -175,6 +196,6 @@ def test_route_invalid_permissions(mocker,
service_id=service_one['id'],
template_type='sms',
template_id=123),
['blah'],
['view_activity'],
api_user_active,
service_one)