mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
add user permissions to the letters endpoints
you can get in with either "manage_templates" or "send_letters" also improve running of a bunch of tests, by parametrising rather than looping and by cleaning up some mock imports
This commit is contained in:
@@ -8,7 +8,7 @@ from app.utils import user_has_permissions
|
||||
|
||||
@main.route("/services/<service_id>/letters")
|
||||
@login_required
|
||||
@user_has_permissions('manage_templates', admin_override=True)
|
||||
@user_has_permissions('manage_templates', 'send_letters', admin_override=True, any_=True)
|
||||
def letters(service_id):
|
||||
if not current_service['can_send_letters']:
|
||||
abort(403)
|
||||
|
||||
Reference in New Issue
Block a user