Revision bb8da765
Added by Romain Vrignaud over 10 years ago
app/controllers/concerns/foreman/controller/smart_proxy_auth.rb | ||
---|---|---|
|
||
# Permits registered puppetmasters or a user with permission
|
||
def require_puppetmaster_or_login
|
||
if !Setting[:restrict_registered_puppetmasters] or auth_smart_proxy(SmartProxy.puppet_proxies, Setting[:require_ssl_puppetmasters])
|
||
if !Setting[:restrict_registered_puppetmasters] or auth_smart_proxy(SmartProxy.puppet_proxies+SmartProxy.chefproxy_proxies, Setting[:require_ssl_puppetmasters])
|
||
set_admin_user
|
||
return true
|
||
end
|
db/seeds.rb | ||
---|---|---|
end
|
||
|
||
# Proxy features
|
||
[ "TFTP", "DNS", "DHCP", "Puppet", "Puppet CA", "BMC" ].each do |input|
|
||
[ "TFTP", "DNS", "DHCP", "Puppet", "Puppet CA", "BMC", "Chef Proxy" ].each do |input|
|
||
f = Feature.find_or_create_by_name(input)
|
||
raise "Unable to create proxy feature: #{format_errors f}" if f.nil? || f.errors.any?
|
||
end
|
test/fixtures/features.yml | ||
---|---|---|
|
||
bmc:
|
||
name: BMC
|
||
|
||
chefproxy:
|
||
name: Chef Proxy
|
Also available in: Unified diff
fixes #3658 - support smart proxy's chef proxy feature