Actions
Bug #11767
closedTemplates are not being resolved in the host form
Description
Even though the templates are set correctly, when hitting "Resolve" the response is always "Sorry but no templates were configured". Provisioning itself is not affected and works as expected though.
Further investigation showed the problem is in mass assignment that happens in the background call triggered by the button:
| ActiveModel::MassAssignmentSecurity::Error (Can't mass-assign protected attributes: 0, new_interfaces): | app/models/concerns/foreman/sti.rb:22:in `new' | app/models/concerns/foreman/sti.rb:22:in `new_with_cast' | app/models/host/base.rb:75:in `initialize' | app/models/host/managed.rb:49:in `initialize' | app/models/concerns/foreman/sti.rb:22:in `new' | app/models/concerns/foreman/sti.rb:22:in `new_with_cast' | app/models/host.rb:15:in `method_missing' | app/controllers/hosts_controller.rb:549:in `template_used' | app/controllers/concerns/application_shared.rb:13:in `set_timezone' | app/models/concerns/foreman/thread_session.rb:32:in `clear_thread' | lib/middleware/catch_json_parse_errors.rb:9:in `call'
It was introduced by fix for http://projects.theforeman.org/issues/9058
Actions