Revision d42544e5
Added by Sean O'Keeffe over 7 years ago
app/controllers/hosts_controller.rb | ||
---|---|---|
return head(:not_found) unless @hostgroup
|
||
|
||
@host = if params[:host][:id]
|
||
host = Host::Base.authorized(:view_hosts, Host).find(params[:host][:id])
|
||
host = Host::Base.authorized(:view_hosts).find(params[:host][:id])
|
||
host = host.becomes Host::Managed
|
||
host.attributes = host.apply_inherited_attributes(host_params)
|
||
host
|
Also available in: Unified diff
Fixes #17683 - Wrong resource type in HG AJAX permission check
(cherry picked from commit 7892585d897ad5843a285bb9ddb5100b664b03cd)