mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-27 11:19:21 -04:00
remove unnecessary invocations of has_permissions(..., any_=True)
when added to a service, all users are given the view_activity permission. So, if that's included in the list, we don't need `any_`, and we don't need any of the other permissions.
This commit is contained in:
@@ -1752,7 +1752,7 @@ def test_route_permissions(
|
||||
service_id=service_one['id'],
|
||||
template_id=fake_uuid
|
||||
),
|
||||
['send_texts', 'send_emails', 'send_letters'],
|
||||
['view_activity', 'send_texts', 'send_emails', 'send_letters'],
|
||||
api_user_active,
|
||||
service_one)
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ def test_should_be_able_to_view_a_template_with_links(
|
||||
permissions,
|
||||
links_to_be_shown,
|
||||
):
|
||||
active_user_with_permissions._permissions[service_one['id']] = permissions
|
||||
active_user_with_permissions._permissions[service_one['id']] = permissions + ['view_activity']
|
||||
client.login(active_user_with_permissions, mocker, service_one)
|
||||
|
||||
response = client.get(url_for(
|
||||
|
||||
Reference in New Issue
Block a user