{% endblock %}
{% block appbar %}
{{ block.super }}
{% trans "Delete" %}{% trans "Edit" %}
{% endblock %}
{% block main %}
{% if api_client.description %}
{{api_client.description}}
{% endif %}
{% trans "Parameters" %}
{% blocktrans with identifier=api_client.identifier %}Identifier: {{ identifier }}{% endblocktrans %}
{% if api_client.ou %}
{% url 'a2-manager-ou-detail' pk=api_client.ou.pk as ou_url %}
{% blocktrans with ou=api_client.ou.name %}Restricted to data within organizational unit {{ ou }}{% endblocktrans %}
{% else %}
{% trans "Unrestricted data access regardless of its organizational unit." %}
{% endif %}
{% if api_client.apiclient_roles.count %}
{% trans "Roles:" %}
{% for role in api_client.apiclient_roles.all %}
{% if role in roles_with_access %}
{{ role.name }}
{% if display_ou %}
{% if role.ou %}
({{ role.ou.name }})
{% else %}
({% trans "No organizational unit" %})
{% endif %}
{% endif %}
{% else %}
{{ role.name }}{% if display_ou %} ({% if role.ou %}{{ role.ou.name }}{% else %}{% trans "No organizational unit" %}{% endif %}){% endif %}
{% endif %}
{% endfor %}
{% if parent_roles %}
{% trans "Inherited roles:" %}
{% for role in parent_roles %}
{% if role in roles_with_access %}
{{ role.name }}
{% if display_ou %}
{% if role.ou %}
({{ role.ou.name }})
{% else %}
({% trans "No organizational unit" %})
{% endif %}
{% endif %}
{% else %}
{{ role.name }}{% if display_ou %} ({% if role.ou %}{{ role.ou.name }}{% else %}{% trans "No organizational unit" %}{% endif %}){% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% else %}
{% trans "No role assigned to this client." %}
{% endif %}
{% if api_client.restrict_to_anonymised_data %}
{% trans "Restricted to anonymised data" %}
{% else %}
{% trans "No restriction to anonymised-only data." %}
{% endif %}
{% if api_client.allowed_user_attributes.count %}
{% trans "Allowed user attributes:" %}
{% for attr in api_client.allowed_user_attributes.all %}
{{ attr.name }}
{% endfor %}
{% else %}
{% trans "Unrestricted access to user profile attributes." %}
{% endif %}
{% if A2_API_USERS_ALLOW_IP_RESTRICTIONS %}
{% trans "IP restrictions" %}
{% if api_client.ip_allow_deny %}
{% trans "(evaluation order Allow/Deny)" %}
{% trans "Allow:" %} {{ api_client.allowed_ip_list|join:", "|default:_("None") }}
{% trans "Deny:" %} {{ api_client.denied_ip_list|join:", "|default:_("None") }}
{% else %}
{% trans "(evaluation order Deny/Allow)" %}
{% trans "Deny:" %} {{ api_client.denied_ip_list|join:", "|default:_("None")}}
{% trans "Allow:" %} {{ api_client.allowed_ip_list|join:", "|default:_("None")}}