Add query controls to views

Add configurators for `allow-query`, `allow-query-on`, `allow-query-cache`, and
`allow-query-cache-on` directives in a view context.
This commit is contained in:
Nate Riffe 2017-01-29 15:57:19 -06:00
parent 67141f4949
commit 7b6565a49c
2 changed files with 32 additions and 0 deletions

View File

@ -9,6 +9,10 @@ define bind::view (
$recursion_match_clients = 'any',
$recursion_match_destinations = '',
$recursion_match_only = false,
$allow_query = 'any',
$allow_query_on = 'any',
$allow_query_cache = 'any',
$allow_query_cache_on = 'any',
$allow_transfers = '',
$notify_source = '',
$also_notify = '',

View File

@ -33,6 +33,34 @@ view "<%= @name %>" {
<%- end -%>
};
<%- end -%>
<%- if @allow_query and @allow_query != '' -%>
allow-query {
<%- Array(@allow_query).each do |query_client| -%>
<%= query_client %>;
<%- end -%>
};
<%- end -%>
<%- if @allow_query_on and @allow_query_on != '' -%>
allow-query-on {
<%- Array(@allow_query_on).each do |query_server| -%>
<%= match_server %>;
<%- end -%>
};
<%- end -%>
<%- if @allow_query_cache and @allow_query_cache != '' -%>
allow-query-cache {
<%- Array(@allow_query_cache).each do |query_client| -%>
<%= query_client %>;
<%- end -%>
};
<%- end -%>
<%- if @allow_query_cache_on and @allow_query_cache_on != '' -%>
allow-query-cache-on {
<%- Array(@allow_query_cache_on).each do |query_server| -%>
<%= query_server %>;
<%- end -%>
};
<%- end -%>
<%- end -%>
<%- if @allow_transfers and @allow_transfers != '' -%>
allow-transfer {