don't allow us to create permissions decorator without permissions

ie: not for an organisation, and not for a service
This commit is contained in:
Leo Hemsted
2018-03-01 12:08:22 +00:00
parent d14f33ea70
commit 7f268c0ab3
3 changed files with 46 additions and 7 deletions

View File

@@ -107,7 +107,7 @@
{% macro edit_field(text, link, permissions=[]) -%}
{% call field(align='right') %}
{% if current_user.has_permissions(*permissions) or not permissions %}
{% if not permissions or current_user.has_permissions(*permissions) %}
<a href="{{ link }}">{{ text }}</a>
{% endif %}
{% endcall %}