<%# Admin permission detail body, captured into the shell content slot. Config: permission { name } members { action, rows: { kind:"group"|"identity", label, subject }[] } action = revoke endpoint effective { label }[] users who hold the permission (expand) add { action, options: {label,value}[] } action = assign endpoint del { action } delete the whole permission csrfToken, error? %><% const permission = locals.permission; const members = locals.members; const effective = locals.effective; const add = locals.add; const del = locals.del; const csrf = locals.csrfToken; -%>
<% if (locals.error) { -%> <%- include("partials/alert", { text: locals.error, tone: "neg" }) %> <% } -%>

<%= t("admin.permissions.assignedTo") %>

<% if (members.rows.length) { -%>
<% members.rows.forEach((m) => { -%> <% }) -%>
<%= t("admin.groups.membersOf", { name: permission.name }) %>
<%= t("admin.common.member") %><%= t("admin.common.type") %><%= t("table.actions") %>
<%= m.label %><%= m.kind === "group" ? t("admin.common.group") : t("admin.common.user") %>
<% } else { -%>

<%= t("admin.permissions.noMembers") %>

<% } -%>

<%= t("admin.permissions.effective") %>

<%= t("admin.permissions.effectiveHint") %>

<% if (effective.length) { -%> <% } else { -%>

<%= t("admin.permissions.noEffective") %>

<% } -%>

<%= t("admin.permissions.assign") %>

<% if (add.options.length) { -%>
<% } else { -%>

<%= t("admin.permissions.allAssigned") %>

<% } -%>
"> <%= t("admin.permissions.delete") %>