{% extends "community/_base.html" %} {% from "macros/box.html" import m_box_content, m_box_menu with context %} {% from "macros/recent.html" import m_recent_items %} {% macro m_users_table(users_and_roles, controls) %} {% set table_id = uuid() %}
{{ csrf.field() }} {% if controls %} {% endif %} {% for user, role, has_access in users_and_roles %} {%- if controls %} {%- endif %} {% endfor %}
Last Name First Name {{ _("Name") }} {{ _("Role") }}{{ _("Action") }}
{%- if not user.can_login %} {%- elif has_access %}   {%- endif %} {{ user.last_name }} {{ user.first_name }} {%- if not user.can_login %}{%- endif %} {{ user.name }} ({{ user.email }}) {%- if not user.can_login %}{%- endif %} {{ role }}
{%- deferJS %} {%- enddeferJS %}
{% endmacro %} {% macro m_groups_table(groups_and_roles, controls) %} {% set table_id = uuid() %}
{{ csrf.field() }} {% if controls %} {% endif %} {% for group, role in groups_and_roles %} {%- if controls %} {% endif %} {% endfor %}
{{ _("Name") }} {{ _("Role") }}{{ _("Action") }}
{{ group.name }} {{ role }}
{%- deferJS %} {%- enddeferJS %}
{% endmacro %} {% block content %} {% call m_box_content("Permissions") %}

{{ _('Manage permissions on {folder}').format(folder=folder.title) }}

{{ _("Export to Excel") }}

{{ _("Inheritance") }}

{% if folder.inherit_security %} {{ _("Activated") }} {% else %} {{ _("Deactivated") }} {% endif %} {#

Current local roles for groups

{% if groups_and_local_roles %} {{ m_groups_table(groups_and_local_roles, controls=True) }} {% else %} {{ _("Nothing") }}. {% endif %}

{{ _("Current inherited roles for groups") }}

{% if folder.inherit_security %} {% if groups_and_inherited_roles %} {{ m_groups_table(groups_and_inherited_roles, controls=False) }} {% else %} {{ _("Nothing") }}. {% endif %} {% else %} {{ _("Deactivated") }} {% endif %}
#}

{{ _("Current local roles for users") }}

{% if users_and_local_roles %} {{ m_users_table(users_and_local_roles, controls=True) }} {% else %} {{ _("Nothing") }}. {% endif %}

{{ _("Current inherited roles for users") }}

{% if folder.inherit_security %} {% if users_and_inherited_roles %} {{ m_users_table(users_and_inherited_roles, controls=False) }} {% else %} {{ _("Nothing") }}. {% endif %} {% else %} {{ _("Deactivated") }} {% endif %}

{{ _("Audit Log") }}

{% for entry in audit_entries %}
{{ entry.msg }}
{% endfor %}
{% endcall %} {% endblock %} {% block sidebar %} {%- set content_actions = actions.for_category('documents:content') %} {%- if content_actions %} {% call m_box_menu() %} {% endcall %} {%- endif %} {% endblock %} {% block modals %} {% include "documents/_modals_folder.html" %} {% include "documents/_modals_roles.html" %} {% endblock %} {% block js %} {% endblock %}