manage api keys permission should be able to see senders

This commit is contained in:
chrisw
2018-01-25 15:29:05 +00:00
parent 7f8e53ee96
commit 5d26d4457f
16 changed files with 133 additions and 62 deletions

View File

@@ -105,9 +105,11 @@
{% endcall %}
{%- endmacro %}
{% macro edit_field(text, link) -%}
{% macro edit_field(text, link, permissions=[]) -%}
{% call field(align='right') %}
<a href="{{ link }}">{{ text }}</a>
{% if current_user.has_permissions(*permissions, **{'any_':True, 'admin_override': True}) or not permissions %}
<a href="{{ link }}">{{ text }}</a>
{% endif %}
{% endcall %}
{%- endmacro %}