twofactor_enforced: Make template work with nil values

This commit is contained in:
Magnus Andersson 2024-10-01 11:19:43 +02:00
parent b66e072cf7
commit 4ec608adf2
Signed by untrusted user: mandersson
GPG key ID: 1F7C896B34B28164

View file

@ -214,19 +214,23 @@ $CONFIG = array (
array (
0 => 'admin',
1 => 'forcemfa',
<%- if @twofactor_enforced_groups -%>
<%- index = 2 -%>
<%- @twofactor_enforced_groups.each do |item| -%>
<%= index %> => '<%= item %>',
<%- index += 1 -%>
<%- end -%>
<%- end -%>
),
'twofactor_enforced_excluded_groups' =>
array (
<%- if @twofactor_enforced_excluded_groups -%>
<%- index = 0 -%>
<%- @twofactor_enforced_excluded_groups.each do |item| -%>
<%= index %> => '<%= item %>',
<%- index += 1 -%>
<%- end -%>
<%- end -%>
),
'updatechecker' => false,
'version' => '<%= @nextcloud_version_string %>',