{% extends "::navigation.html.twig" %}

{% block navigationitems %}
    {% if is_granted('ROLE_SUPER_ADMIN') %}
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Rest API <b class="caret"></b></a>
            <ul class="dropdown-menu">
                <li><a href="{{ path('nelmio_api_doc_index') }}">API Documentation</a></li>
                <li><a href="{{ path('life_style_tools_ciphering_test_encode') }}">Ciphering encode</a></li>
                <li><a href="{{ path('life_style_tools_ciphering_test_decode') }}">Ciphering decode</a></li>
                <li><a href="{{ path('life_style_tools_mfa_qr_generate') }}">Generate MFA QR-Code</a></li>
            </ul>
        </li>
    {% endif %}
    {% if is_granted('ROLE_SERVICE_ADMIN') %}
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">APITokens <b class="caret"></b></a>
            <ul class="dropdown-menu">
                <li><a href="{{ path('_admin_backend_token_list') }}">List</a></li>
                <li><a href="{{ path('_admin_backend_token_create') }}">Create</a></li>
                <li><a href="{{ path('_admin_backend_tokenusage_index') }}">Usage</a></li>
                <li><a href="{{ path('_admin_backend_servicetoken_index') }}">Manage Assignments</a></li>
            </ul>
        </li>
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">APIServices <b class="caret"></b></a>
            <ul class="dropdown-menu">
                <li><a href="{{ path('_admin_backend_service') }}">List</a></li>
            </ul>
        </li>
    {% endif %}
    {% if is_granted('ROLE_USER_ADMIN') %}
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">DB Manager <b class="caret"></b></a>
            <ul class="dropdown-menu">
                <li><a href="{{ path('_admin_backend_webservice_user') }}">Users</a></li>
                <li><a href="{{ path('_admin_backend_webservice_user_group') }}">User-Groups</a></li>
                <li><a href="{{ path('_admin_backend_webservice_application') }}">Applications</a></li>
                <li><a href="{{ path('_admin_backend_webservice_application_attribute') }}">Attributes</a></li>
                <li><a href="{{ path('_admin_backend_webservice_application_role') }}">Roles</a></li>
                <li><a href="{{ path('_admin_backend_passwordpolicy_list') }}">Password Policies</a></li>
            </ul>
        </li>
    {% endif %}
    {% if is_granted('ROLE_SERVICE_ADMIN') %}
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">System Logs <b class="caret"></b></a>
            <ul class="dropdown-menu">
                <li><a href="{{ path('_life_style_tools_db_log_overview') }}">View log</a></li>
                <li><a href="{{ path('_life_style_tools_db_log_delete') }}" onclick="return confirm('Delete log?')">Delete
                        log</a></li>
                <li><a href="{{ path('sso_access_log_list') }}">View Access Log</a></li>
            </ul>
        </li>
    {% endif %}
{% endblock %}
{% block navigationfooter %}
    <div class="navigationFooter backendbundle">
        <div class="container">
            <p>SSO uws administration - ( {% include '::serverinfo.html.twig' %} )</p>
        </div>
    </div>
{% endblock %}
