<%- _item = scope.lookupvar('_template_scope')[:item] -%>
<%- if _item['require'] && !(_item['require'].is_a?(String) && (_item['require'] == '' || _item['require'] =~ /unmanaged/i)) -%>
    <%- if _item['require'].is_a?(Hash) -%>
      <%- case _item['require']['enforce'].downcase
          when 'all','none','any' then -%>
    <Require<%= _item['require']['enforce'].capitalize %>>
        <%- Array(_item['require']['requires']).each do |req| -%>
      Require <%= req.strip %>
        <%- end -%>
    </Require<%= _item['require']['enforce'].capitalize %>>
      <%- else -%>
        <%- scope.function_warning(["Apache::Vhost: Require can only overwritten with all, none or any."]) -%>
      <%- end -%>
    <%- else -%>
      <%- Array(_item['require']).each do |req| -%>
    Require <%= req %>
      <%- end -%>
    <%- end -%>
<%- end -%>
<%- if _item['auth_require'] -%>
    Require <%= _item['auth_require'] %>
<%- elsif !_item['require'] || _item['require'] == '' -%>
    Require all granted
<%- end -%>
