Job templates permission filter makes template dropdown disappear
If I try to restrict which job templates are visible to users the job templates dropdown is missing when using 'Schedule Remote Job' from host detail page. There is a 'Job Category' form but no 'Job Template', and trying to submit results in an error:
undefined method `input_values' for nil:NilClass
If I instead take the route via 'Hosts -> Job Templates' I can see the template there, and from there I can click 'Run' which takes me to the same job invocation form as the host detail page does, but now the 'Job Template' form input is present, containing the template I specified in my filter, and running the job works.
This is reproduced by setting the following permissions.
Resource Permissions Search Job template view_job_templates name = "<name of template>"
Setting the filter to unlimited makes the job templates form visible again when invoking via 'Schedule Remote Job' from host detail page.