Use new permissions for the button on the broadcast dashboard

The broadcast dashboards contain a button to create a new broadcast.
This adds the new `create_broadcasts` permission as one of the
permissions needed to see the button.
This commit is contained in:
Katie Smith
2021-07-19 14:40:14 +01:00
parent a84705f834
commit b6905c435b
3 changed files with 30 additions and 11 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
'current_broadcasts'
) }}
{% if current_user.has_permissions('send_messages', restrict_admin_usage=True) %}
{% if current_user.has_permissions('send_messages', 'create_broadcasts', restrict_admin_usage=True) %}
<div class="js-stick-at-bottom-when-scrolling">
{{ govukButton({
"element": "a",
@@ -13,7 +13,7 @@
{% include('views/broadcast/partials/dashboard-table.html') %}
{% if current_user.has_permissions('send_messages', restrict_admin_usage=True) %}
{% if current_user.has_permissions('send_messages', 'create_broadcasts', restrict_admin_usage=True) %}
<div class="js-stick-at-bottom-when-scrolling">
{{ govukButton({
"element": "a",