@@ -89,7 +89,7 @@ def get_example_letter_address(key):
89
89
90
90
91
91
@main .route ("/services/<uuid:service_id>/send/<uuid:template_id>/csv" , methods = ["GET" , "POST" ])
92
- @user_has_permissions ("send_messages" , restrict_admin_usage = True )
92
+ @user_has_permissions ("send_messages" )
93
93
def send_messages (service_id , template_id ):
94
94
template = current_service .get_template_with_user_permission_or_403 (
95
95
template_id ,
@@ -197,7 +197,7 @@ def _should_show_set_sender_page(service_id, template) -> bool:
197
197
198
198
199
199
@main .route ("/services/<uuid:service_id>/send/<uuid:template_id>/set-sender" , methods = ["GET" , "POST" ])
200
- @user_has_permissions ("send_messages" , restrict_admin_usage = True )
200
+ @user_has_permissions ("send_messages" )
201
201
def set_sender (service_id , template_id ):
202
202
template = current_service .get_template_with_user_permission_or_403 (template_id , current_user )
203
203
@@ -333,7 +333,7 @@ def get_sender_details(service_id, template_type):
333
333
334
334
335
335
@main .route ("/services/<uuid:service_id>/send/<uuid:template_id>/one-off" )
336
- @user_has_permissions ("send_messages" , restrict_admin_usage = True )
336
+ @user_has_permissions ("send_messages" )
337
337
def send_one_off (service_id , template_id ):
338
338
session ["recipient" ] = None
339
339
session ["placeholders" ] = {}
@@ -375,7 +375,7 @@ def get_notification_check_endpoint(service_id, template):
375
375
376
376
377
377
@main .route ("/services/<uuid:service_id>/send/<uuid:template_id>/one-off/address" , methods = ["GET" , "POST" ])
378
- @user_has_permissions ("send_messages" , restrict_admin_usage = True )
378
+ @user_has_permissions ("send_messages" )
379
379
def send_one_off_letter_address (service_id , template_id ):
380
380
if {"recipient" , "placeholders" } - set (session .keys ()):
381
381
# if someone has come here via a bookmark or back button they might have some stuff still in their session
@@ -439,7 +439,7 @@ def send_one_off_letter_address(service_id, template_id):
439
439
"/services/<uuid:service_id>/send/<uuid:template_id>/one-off/step-<int:step_index>" ,
440
440
methods = ["GET" , "POST" ],
441
441
)
442
- @user_has_permissions ("send_messages" , restrict_admin_usage = True )
442
+ @user_has_permissions ("send_messages" )
443
443
def send_one_off_step (service_id , template_id , step_index ): # noqa: C901
444
444
if {"recipient" , "placeholders" } - set (session .keys ()):
445
445
return redirect (
@@ -781,7 +781,7 @@ def _check_messages(service_id, template_id, upload_id, preview_row, emergency_c
781
781
@main .route (
782
782
"/services/<uuid:service_id>/<uuid:template_id>/check/<uuid:upload_id>/row-<int:row_index>" , methods = ["GET" ]
783
783
)
784
- @user_has_permissions ("send_messages" , restrict_admin_usage = True )
784
+ @user_has_permissions ("send_messages" )
785
785
def check_messages (service_id , template_id , upload_id , row_index = 2 ):
786
786
emergency_contact = bool (request .args .get ("emergency_contact" ))
787
787
data = _check_messages (service_id , template_id , upload_id , row_index , emergency_contact )
@@ -1005,7 +1005,7 @@ def get_skip_link(step_index, template):
1005
1005
1006
1006
1007
1007
@main .route ("/services/<uuid:service_id>/template/<uuid:template_id>/one-off/send-to-myself" , methods = ["GET" ])
1008
- @user_has_permissions ("send_messages" , restrict_admin_usage = True )
1008
+ @user_has_permissions ("send_messages" )
1009
1009
def send_one_off_to_myself (service_id , template_id ):
1010
1010
# We aren't concerned with creating the exact template (for example adding recipient and sender names)
1011
1011
# we just want to create enough to use `fields_to_fill_in`
@@ -1027,7 +1027,7 @@ def send_one_off_to_myself(service_id, template_id):
1027
1027
1028
1028
1029
1029
@main .route ("/services/<uuid:service_id>/template/<uuid:template_id>/notification/check" , methods = ["GET" ])
1030
- @user_has_permissions ("send_messages" , restrict_admin_usage = True )
1030
+ @user_has_permissions ("send_messages" )
1031
1031
def check_notification (service_id , template_id ):
1032
1032
return render_template (
1033
1033
"views/notifications/check.html" ,
0 commit comments