fixes #17395 - use admin user for load_template_vars
When `load_template_vars` is called from before_action, the current user must already be set to ensure caching of parameters inside Host#params is done with consistent permissions. Otherwise when Foreman::Renderer's kickstart_attributes (or similar) renders a ptable that uses params, the method will cache an empty parameters hash.
(cherry picked from commit f8a2b268619722b7b696ab5ab000d2b0e5ae42df)
Related issues
Bug #17395: @host.params are not interpreted when was used in ptable kickstart template.
fixes #17395 - use admin user for load_template_vars
When `load_template_vars` is called from before_action, the current user
must already be set to ensure caching of parameters inside Host#params
is done with consistent permissions. Otherwise when Foreman::Renderer's
kickstart_attributes (or similar) renders a ptable that uses params,
the method will cache an empty parameters hash.
(cherry picked from commit f8a2b268619722b7b696ab5ab000d2b0e5ae42df)