mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 13:39:57 -04:00
Let users with empty permissions see certain pages
We’re going to make it possible for some users to be members of a service, but not have any permissions (not even `view_activity`). There are some pages that these users should still be able to see These are the pages that a user with ‘basic view’ would have been able to see, excluding those that let them send messages.
This commit is contained in:
@@ -2216,13 +2216,13 @@ def test_route_permissions_send_check_notifications(
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('route', [
|
||||
'main.choose_template',
|
||||
'main.send_messages',
|
||||
'main.get_example_csv',
|
||||
'main.send_test'
|
||||
@pytest.mark.parametrize('route, expected_status', [
|
||||
('main.choose_template', 200),
|
||||
('main.send_messages', 403),
|
||||
('main.get_example_csv', 403),
|
||||
('main.send_test', 403),
|
||||
])
|
||||
def test_route_invalid_permissions(
|
||||
def test_route_permissions_sending(
|
||||
mocker,
|
||||
app_,
|
||||
client,
|
||||
@@ -2235,12 +2235,13 @@ def test_route_invalid_permissions(
|
||||
mock_create_job,
|
||||
fake_uuid,
|
||||
route,
|
||||
expected_status,
|
||||
):
|
||||
validate_route_permission(
|
||||
mocker,
|
||||
app_,
|
||||
"GET",
|
||||
403,
|
||||
expected_status,
|
||||
url_for(
|
||||
route,
|
||||
service_id=service_one['id'],
|
||||
|
||||
Reference in New Issue
Block a user