{%extends "base.html"%} {%from "oauth2/profile_nav.html" import profile_nav%} {%from "oauth2/display_error.html" import display_error%} {%block title%}View User{%endblock%} {%block content%} {%macro unassign_button(resource_id, role_id, privilege_id)%} {%endmacro%}
{{profile_nav(uipages, user_privileges)}} {{flash_me()}} {%if resource_error is defined%} {{display_error("Resource", resource_error)}} {%else%}

Role for Resource '{{resource.resource_name}}'

{%if role_error is defined%} {{display_error("Role", role_error)}} {%else%} {%for priv in role.privileges%} {%if loop.index0 == 0%} {%else%} {%endif%} {%else%} {%endfor%}
Role '{{role.role_name}}' for resource '{{resource.resource_name}}'
Role Name Privilege Action
{{role.role_name}} {{priv.privilege_description}} {{unassign_button(resource.resource_id, role.role_id, priv.privilege_id)}}
{{priv.privilege_description}} {{unassign_button(resource.resource_id, role.role_id, priv.privilege_id)}}

  This role has no privileges.

{%if unassigned_privileges | length == 0%}

{{title}}:   There are no more privileges left to assign.

{%else%}
Select privileges to assign to this role {%for priv in unassigned_privileges%}
{%endfor%}
{%endif%}
{%if user_error is defined%} {{display_error("Users", user_error)}} {%endif%} {%if users is defined and users | length > 0%}

Users

{%for user in users%} {%endfor%}
Users assigned role '{{role.role_name}}' on resource '{{resource.resource_name}}'
Email Name
{{user.email}} {{user.name}}
{%endif%} {%if users is defined and users | length == 0%}

Delete this role

Delete Role:   This will delete this role, and you will no longer have access to it.

{%endif%} {%endif%} {%endif%}
{%endblock%}