remove unnecessary invocations of has_permissions(..., any_=True)

when added to a service, all users are given the view_activity
permission. So, if that's included in the list, we don't need `any_`,
and we don't need any of the other permissions.
This commit is contained in:
Leo Hemsted
2018-02-27 17:18:26 +00:00
parent 7ddad7c99e
commit bd54dbb40c
7 changed files with 9 additions and 39 deletions

View File

@@ -14,7 +14,7 @@
{% if not templates %}
{% if current_user.has_permissions('manage_templates', any_=True) %}
{% if current_user.has_permissions('manage_templates') %}
<p class="bottom-gutter">
You need a template before you can send text messages.
</p>

View File

@@ -14,7 +14,7 @@
<h1 class="heading-large">Templates</h1>
{% if current_user.has_permissions('manage_templates', any_=True) %}
{% if current_user.has_permissions('manage_templates') %}
<p class="bottom-gutter">
You need a template before you can send
{% if 'letter' in current_service.permissions %}