mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user