{# detail carries what the message needs beside the name: the forwarding
target of a user delete, the group of a membership change and the number
of removed members of a purging or emptying operation. #}
{% if outcome.op == "insert" %}
{% if outcome.kind == "group" %}
{{ t("dml.security_group_created", name=outcome.name) }}
{% else %}
{{ t("dml.security_user_created", name=outcome.name) }}
{% endif %}
{% elif outcome.op == "update" %}
{% if outcome.kind == "group" %}
{{ t("dml.security_group_updated", name=outcome.name) }}
{% else %}
{{ t("dml.security_user_updated", name=outcome.name) }}
{% endif %}
{% elif outcome.op == "delete" %}
{% if outcome.kind == "group" %}
{% if outcome.detail %}
{{ t("dml.security_group_deleted_purged", name=outcome.name, count=outcome.detail) }}
{% else %}
{{ t("dml.security_group_deleted", name=outcome.name) }}
{% endif %}
{% elif outcome.detail %}
{{ t("dml.security_user_deleted_forwarded", name=outcome.name, target=outcome.detail) }}
{% else %}
{{ t("dml.security_user_deleted", name=outcome.name) }}
{% endif %}
{% elif outcome.op == "add" %}
{{ t("dml.security_member_added", user=outcome.name, group=outcome.detail) }}
{% elif outcome.op == "remove" %}
{{ t("dml.security_member_removed", user=outcome.name, group=outcome.detail) }}
{% elif outcome.op == "remove_all" %}
{{ t("dml.security_member_removed_all", user=outcome.name, count=outcome.detail or 0) }}
{% elif outcome.op == "empty" %}
{{ t("dml.security_group_emptied", group=outcome.name, count=outcome.detail or 0) }}
{% endif %}
{# The write is in the database, but a rights decision reads the model the
server holds in memory. So the change is done and not yet in effect, the
way a registry write is set and not yet saved. #}
{% if outcome.reload_requested %}
{% for server, ok, message in outcome.reload_rows %}
-
{{ t("security.reloaded", server=server) if ok else t("security.reload_failed", server=server, detail=message) }}
{% endfor %}
{% for failure in outcome.reload_errors %}
-
{{ t("security.reload_failed", server=failure.server, detail=failure.message) }}
{% endfor %}
{% else %}
{{ t("security.not_reloaded") }}
{% endif %}