remove any_ from has_permissions

we branch on any_ to either say "require ALL these permissions" or
"require ANY of these permissions". But we only ever call the decorator
with one permission, or with any_=True, so it's unnecessary
This commit is contained in:
Leo Hemsted
2018-03-01 10:37:55 +00:00
parent 4a08cf81e7
commit 3afc193624
8 changed files with 12 additions and 18 deletions

View File

@@ -51,7 +51,7 @@
{% if current_user.has_permissions('manage_service') %}
<li><a href="{{ url_for('.usage', service_id=current_service.id) }}">Usage</a></li>
{% endif %}
{% if current_user.has_permissions('manage_api_keys', 'manage_service', any_=True) %}
{% if current_user.has_permissions('manage_api_keys', 'manage_service') %}
<li><a href="{{ url_for('.service_settings', service_id=current_service.id) }}">Settings</a></li>
{% endif %}
{% if current_user.has_permissions('manage_api_keys') %}