This commit is contained in:
Christoph 2022-02-20 01:48:21 +01:00
parent 6673afbe95
commit 62e8e5ecbc
2 changed files with 9 additions and 1 deletions

View File

@ -25,7 +25,9 @@
{%- for item in samba_shares | default([]) %}
{% if (item.vfs_object_recycle is defined and item.vfs_object_recycle|bool) %}
{% if item.recycle_path is defined and item.recycle_path|length > 0 %}
{% set count.trash_dirs = count.trash_dirs + 1 %}
{% endif %}
{% endif %}
{% endfor %}
@ -33,7 +35,9 @@
trash_dirs="
{% for item in samba_shares %}
{% if (item.vfs_object_recycle is defined and item.vfs_object_recycle|bool) %}
{% if item.recycle_path is defined and item.recycle_path|length > 0 %}
{{ item.path }}/{{ item.recycle_path }}
{% endif %}
{% endif %}
{% endfor %}
"

View File

@ -27,7 +27,11 @@
{% if count.samba_shares > 0 %}
dir_permissions="
{% for item in samba_shares | default([]) %}
{{ item.path }}:{{ item.group_write_list }}:{{ item.file_create_mask | default('0660') }}:{{ item.dir_create_mask | default('2770') }};
{% if item.file_create_mask is defined and item.file_create_mask|length > 0
and item.dir_create_mask is defined and item.dir_create_mask|length > 0
and item.group_write_list is defined and item.group_write_list|length > 0 %}
{{ item.path }}:{{ item.group_write_list | default('root', true) }}:{{ item.file_create_mask|string | default('660', true) }}:{{ item.dir_create_mask | default('2770', true) }};
{% endif %}
{% endfor %}
"
{% endif %}