{%macro profile_nav(calling_page, user_sys_privileges)%} <ul class="nav nav-pills"> <li role="presentation" {%if calling_page == "dashboard"%} class="active" {%endif%}> <a href="{{url_for('oauth2.user.user_profile')}}">Dashboard</a> </li> <li role="presentation" {%if calling_page == "group"%} class="active" {%endif%}> <a href="{{url_for('oauth2.group.user_group')}}">Group</a> </li> <li role="presentation" {%if calling_page == "roles"%} class="active" {%endif%}> <a href="{{url_for('oauth2.role.user_roles')}}">Roles</a> </li> <li role="presentation" {%if calling_page == "resources"%} class="active" {%endif%}> <a href="{{url_for('oauth2.resource.user_resources')}}">Resources</a> </li> {%if "system:data:link-to-group" in user_sys_privileges %} <li role="presentation" {%if calling_page == "data"%} class="active" {%endif%}> <a href="{{url_for('oauth2.data.list_data')}}">Link Data</a> </li> {%endif%} {%if "system:user:masquerade" in user_sys_privileges %} <li role="presentation" {%if calling_page == "masquerade"%} class="active" {%endif%}> <a href="{{url_for('oauth2.user.masquerade')}}" title="Masquerade as another user"> Masquerade As </a> </li> {%endif%} <li role="presentation"> {%if logged_in():%} <a href="{{url_for('oauth2.user.logout')}}">Logout</a> {%else%} <a href="{{url_for('oauth2.user.login')}}">Login</a> {%endif%} </li> </ul> {%endmacro%}