Bug #31511
closedJob templates permission filter makes template dropdown disappear
Description
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.
Updated by Adam Winberg almost 4 years ago
- Found in Releases foreman_remote_execution 4.2.1 added
Updated by Adam Ruzicka about 3 years ago
- Is duplicate of Bug #33340: Creating a Job via an user with selective permissions will not show "Job template" in the form unless refreshing the result of Search Query added