mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
Merge pull request #2735 from alphagov/dont-check-upload-letter-permission
Remove check on permission to upload letters
This commit is contained in:
@@ -26,7 +26,6 @@ from app.models import (
|
|||||||
EMAIL_TYPE,
|
EMAIL_TYPE,
|
||||||
LETTER_TYPE,
|
LETTER_TYPE,
|
||||||
NOTIFICATION_DELIVERED,
|
NOTIFICATION_DELIVERED,
|
||||||
UPLOAD_LETTERS,
|
|
||||||
)
|
)
|
||||||
from app.dao.services_dao import dao_fetch_service_by_id
|
from app.dao.services_dao import dao_fetch_service_by_id
|
||||||
from app.dao.templates_dao import dao_get_template_by_id_and_service_id, get_precompiled_letter_template
|
from app.dao.templates_dao import dao_get_template_by_id_and_service_id, get_precompiled_letter_template
|
||||||
@@ -139,7 +138,6 @@ def send_pdf_letter_notification(service_id, post_data):
|
|||||||
service = dao_fetch_service_by_id(service_id)
|
service = dao_fetch_service_by_id(service_id)
|
||||||
|
|
||||||
check_service_has_permission(LETTER_TYPE, service.permissions)
|
check_service_has_permission(LETTER_TYPE, service.permissions)
|
||||||
check_service_has_permission(UPLOAD_LETTERS, service.permissions)
|
|
||||||
check_service_over_daily_message_limit(KEY_TYPE_NORMAL, service)
|
check_service_over_daily_message_limit(KEY_TYPE_NORMAL, service)
|
||||||
validate_created_by(service, post_data['created_by'])
|
validate_created_by(service, post_data['created_by'])
|
||||||
validate_and_format_recipient(
|
validate_and_format_recipient(
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ from tests.app.db import create_service
|
|||||||
|
|
||||||
@pytest.mark.parametrize('permissions', [
|
@pytest.mark.parametrize('permissions', [
|
||||||
[EMAIL_TYPE],
|
[EMAIL_TYPE],
|
||||||
[LETTER_TYPE],
|
|
||||||
[UPLOAD_LETTERS],
|
[UPLOAD_LETTERS],
|
||||||
])
|
])
|
||||||
def test_send_pdf_letter_notification_raises_error_if_service_does_not_have_permission(
|
def test_send_pdf_letter_notification_raises_error_if_service_does_not_have_permission(
|
||||||
|
|||||||
Reference in New Issue
Block a user