mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 23:08:25 -04:00
Allow org admin to send messages within a service
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<p class="usa-hint">
|
||||
This template was deleted {{ template._template.updated_at|format_datetime_relative }}.
|
||||
</p>
|
||||
{% elif not current_user.has_permissions(ServicePermission.SEND_MESSAGES, 'manage_api_keys', ServicePermission.MANAGE_TEMPLATES, ServicePermission.MANAGE_SERVICE) or not user_has_template_permission %}
|
||||
{% elif not current_user.has_permissions(ServicePermission.SEND_MESSAGES, 'manage_api_keys', ServicePermission.MANAGE_TEMPLATES, ServicePermission.MANAGE_SERVICE, allow_org_user=True) or not user_has_template_permission %}
|
||||
<p class="top-gutter-1-3 {% if template.template_type != 'sms' %}margin-bottom-3{% endif %}">
|
||||
If you need to send this
|
||||
{{ 1|message_count_label(template.template_type, suffix='') }}
|
||||
@@ -17,12 +17,12 @@
|
||||
{% else %}
|
||||
<div class="grid-row margin-bottom-5">
|
||||
<div class="usa-button-group">
|
||||
{% if current_user.has_permissions(ServicePermission.SEND_MESSAGES, restrict_admin_usage=True) %}
|
||||
{% if current_user.has_permissions(ServicePermission.SEND_MESSAGES, restrict_admin_usage=True, allow_org_user=True) %}
|
||||
<a href="{{ url_for(".set_sender", service_id=current_service.id, template_id=template.id) }}" class="usa-button usa-pill-separate-item">
|
||||
Use this template
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if current_user.has_permissions(ServicePermission.MANAGE_TEMPLATES) %}
|
||||
{% if current_user.has_permissions(ServicePermission.MANAGE_TEMPLATES, allow_org_user=True) %}
|
||||
<a href="{{ url_for(".edit_service_template", service_id=current_service.id, template_id=template.id) }}" class="usa-button usa-button--outline usa-pill-separate-item">
|
||||
Edit this template
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user