summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-06-19 22:45:03 +0000
committerGerrit Code Review <review@openstack.org>2018-06-19 22:45:03 +0000
commit4832918302517df678a648d42f0bb4af65bd8678 (patch)
treea472835ab2f1ea01d9917d2e3c402d67bcda815c
parent7a3b3c6f81eb0f052e7ac90623969473434fefbc (diff)
parent281acd62ab137d139912a7335b923282baf571eb (diff)
Merge "Fix scope of vhost template variables"
-rw-r--r--templates/ethercalc.vhost.erb15
1 files changed, 8 insertions, 7 deletions
diff --git a/templates/ethercalc.vhost.erb b/templates/ethercalc.vhost.erb
index 5c587fd..2b048b3 100644
--- a/templates/ethercalc.vhost.erb
+++ b/templates/ethercalc.vhost.erb
@@ -38,20 +38,21 @@
38 # MSIE 7 and newer should be able to use keepalive 38 # MSIE 7 and newer should be able to use keepalive
39 BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown 39 BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
40 40
41 <% if @auth_openid != nil %> 41 <% auth_openid = scope["ethercalc::apache::auth_openid"] %>
42 <% if ! [nil, :undef].include?(auth_openid) %>
42 <Location /> 43 <Location />
43 AuthType OpenID 44 AuthType OpenID
44 AuthName "<%= @auth_openid['banner'] %>" 45 AuthName "<%= auth_openid['banner'] %>"
45 AuthOpenIDSecureCookie On 46 AuthOpenIDSecureCookie On
46 AuthOpenIDCookieLifespan 3600 47 AuthOpenIDCookieLifespan 3600
47 AuthOpenIDTrustRoot https://<%= scope.lookupvar("ethercalc::apache::vhost_name") %> 48 AuthOpenIDTrustRoot https://<%= scope.lookupvar("ethercalc::apache::vhost_name") %>
48 AuthOpenIDServerName https://<%= scope.lookupvar("ethercalc::apache::vhost_name") %> 49 AuthOpenIDServerName https://<%= scope.lookupvar("ethercalc::apache::vhost_name") %>
49 AuthOpenIDSingleIdP <%= @auth_openid['singleIdp'] %> 50 AuthOpenIDSingleIdP <%= auth_openid['singleIdp'] %>
50 AuthOpenIDTrusted <%= @auth_openid['trusted'] %> 51 AuthOpenIDTrusted <%= auth_openid['trusted'] %>
51 <% if @auth_openid['any_valid_user'] %> 52 <% if auth_openid['any_valid_user'] %>
52 Require valid-user 53 Require valid-user
53 <% elsif !@auth_openid['users'].empty? %> 54 <% elsif !auth_openid['users'].empty? %>
54 <% @auth_openid['users'].each do |user| -%> 55 <% auth_openid['users'].each do |user| -%>
55 Require user <%= user %> 56 Require user <%= user %>
56 <% end -%> 57 <% end -%>
57 <% end %> 58 <% end %>