This commit is contained in:
Christoph 2022-02-20 01:46:11 +01:00
parent 25ea5114f2
commit 8a107db53a
2 changed files with 9 additions and 1 deletions

View File

@ -25,16 +25,20 @@
{%- 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 %}
{% if count.trash_dirs > 0 %}
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 %}
"
{% endif %}

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 %}