foreman_remote_execution 11.1.1 → 11.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16d56ae409f173cfae7b2ff5f9e5db8a86bbb12574efcd2ab1e9acd9b80ce07f
4
- data.tar.gz: d2897bd622c9d79613ee1f07102a07799f70aff7d0f031345394adb4f4badfb6
3
+ metadata.gz: '099d9d7140c506a3f504b68de05eec293d4dd391bdd402b085019aaaa26c82a7'
4
+ data.tar.gz: 2811f1aefc0cf16d65a7bf999927ccda7e31bf70705c2f1ff223d46c41de9d67
5
5
  SHA512:
6
- metadata.gz: 87591392d5a1cb138e271820de90d0c2d661489fa02a3943f6a8baa5ed27fcaf81b6bf1b9a12749ad77c3a8c1ed95bfad4cdba24c4e653015d0922ef57c4f8cd
7
- data.tar.gz: b1e00a53b261dedd92b23c2c7ddf8b22112a5197a71e778401a7e9d67e08dfc5f2bbaabacbc8302146365a74cff9e1ce864227967b4040eed36b688969e8183f
6
+ metadata.gz: d793830b576a7b8fb698fa4ef940b182ba8fae1f0bc3e30cef5f485330f6d04e4a1e47fba9878a63854dca208fd9b51a3954f5ed93379918690706f44c3ffa4b
7
+ data.tar.gz: 119ff10ea101c237b96bc6b6a9d013505804a578150c99b30323c8da37fa6ee15399d56b599ae078c259bc88d8048ec1717ef1f59ec46122b8db25e92a885066
@@ -64,7 +64,10 @@ class UiJobWizardController < ApplicationController
64
64
  job = JobInvocation.authorized.find(params[:id])
65
65
  composer = JobInvocationComposer.from_job_invocation(job, params).params
66
66
  job_template_inputs = JobTemplate.authorized.find(composer[:template_invocations][0][:template_id]).template_inputs_with_foreign
67
- inputs = Hash[job_template_inputs.map { |input| ["inputs[#{input[:name]}]", {:advanced => input[:advanced], :value => (composer[:template_invocations][0][:input_values].find { |value| value[:template_input_id] == input[:id] }).try(:[], :value)}] }]
67
+ job_template_inputs_hash = Hash[job_template_inputs.map { |input| ["inputs[#{input[:name]}]", {:advanced => input[:advanced], :value => (composer[:template_invocations][0][:input_values].find { |value| value[:template_input_id] == input[:id] }).try(:[], :value)}] }]
68
+ provider_inputs = composer[:template_invocations][0][:provider_input_values]
69
+ provider_inputs_hash = Hash[provider_inputs.map { |input| ["inputs[#{input[:name]}]", {:advanced => true, :value => input[:value]}] }]
70
+ inputs = job_template_inputs_hash.merge(provider_inputs_hash)
68
71
  job_organization = Taxonomy.find_by(id: job.task.input[:current_organization_id])
69
72
  job_location = Taxonomy.find_by(id: job.task.input[:current_location_id])
70
73
  render :json => {
@@ -33,8 +33,7 @@ module RemoteExecutionHelper
33
33
  links << { title: _('Host detail'),
34
34
  action: { href: current_host_details_path(host), 'data-method': 'get', id: "#{host.name}-actions-detail" } }
35
35
  end
36
-
37
- if authorized_for(hash_for_rerun_job_invocation_path(id: job_invocation, host_ids: [ host.id ], authorizer: job_hosts_authorizer))
36
+ if authorized_for(controller: :job_invocations, action: :create) && (!host.infrastructure_host? || User.current.can?(:execute_jobs_on_infrastructure_hosts))
38
37
  links << { title: (_('Rerun on %s') % host.name),
39
38
  action: { href: rerun_job_invocation_path(job_invocation, host_ids: [ host.id ]),
40
39
  'data-method': 'get', id: "#{host.name}-actions-rerun" } }
@@ -56,7 +55,7 @@ module RemoteExecutionHelper
56
55
  def job_invocations_buttons
57
56
  [
58
57
  documentation_button_rex('3.2ExecutingaJob'),
59
- display_link_if_authorized(_('Run Job'), hash_for_new_job_invocation_path, {:class => "btn btn-primary"}),
58
+ authorized_for(controller: :job_invocations, action: :create) ? link_to(_('Run Job'), hash_for_new_job_invocation_path, {:class => "btn btn-primary"}) : '',
60
59
  ]
61
60
  end
62
61
 
@@ -70,12 +69,12 @@ module RemoteExecutionHelper
70
69
  title: _('Create report for this job'),
71
70
  disabled: task.pending?)
72
71
  end
73
- if authorized_for(hash_for_new_job_invocation_path)
72
+ if authorized_for(controller: :job_invocations, action: :create)
74
73
  buttons << link_to(_('Rerun'), rerun_job_invocation_path(:id => job_invocation.id),
75
74
  :class => 'btn btn-default',
76
75
  :title => _('Rerun the job'))
77
76
  end
78
- if authorized_for(hash_for_new_job_invocation_path)
77
+ if authorized_for(controller: :job_invocations, action: :create)
79
78
  buttons << link_to(_('Rerun failed'), rerun_job_invocation_path(:id => job_invocation.id, :failed_only => 1),
80
79
  :class => 'btn btn-default',
81
80
  :disabled => job_invocation.failed_hosts.none?,
@@ -271,6 +271,7 @@ class JobInvocationComposer
271
271
  job_invocation.pattern_template_invocations.map do |template_invocation|
272
272
  params = template_invocation.attributes.slice('template_id', 'effective_user')
273
273
  params['input_values'] = template_invocation.input_values.map { |v| v.attributes.slice('template_input_id', 'value') }
274
+ params['provider_input_values'] = template_invocation.provider_input_values.map { |v| v.attributes.slice('name', 'value') }
274
275
  params
275
276
  end
276
277
  end
@@ -31,6 +31,9 @@ export CONVERT2RHEL_DISABLE_TELEMETRY=1
31
31
 
32
32
  /usr/bin/convert2rhel analyze -y
33
33
 
34
+ # Workaround for https://issues.redhat.com/browse/RHELC-1280
35
+ subscription-manager facts --update
36
+
34
37
  if grep -q ERROR /var/log/convert2rhel/convert2rhel-pre-conversion.json; then
35
38
  echo "Error: Some error(s) have been found."
36
39
  echo "Exiting ..."
@@ -177,8 +177,11 @@ module ForemanRemoteExecution
177
177
  :'api/v2/job_templates' => [:update],
178
178
  :'api/v2/template_inputs' => [:create, :update, :destroy],
179
179
  :'api/v2/foreign_input_sets' => [:create, :update, :destroy]}, :resource_type => 'JobTemplate'
180
- permission :edit_remote_execution_features, { :remote_execution_features => [:index, :show, :update],
181
- :'api/v2/remote_execution_features' => [:index, :show, :update, :available_remote_execution_features]}, :resource_type => 'RemoteExecutionFeature'
180
+ permission :view_remote_execution_features, { :remote_execution_features => [:index, :show],
181
+ :'api/v2/remote_execution_features' => [:index, :show, :available_remote_execution_features]},
182
+ :resource_type => 'RemoteExecutionFeature'
183
+ permission :edit_remote_execution_features, { :remote_execution_features => [:update],
184
+ :'api/v2/remote_execution_features' => [:update ]}, :resource_type => 'RemoteExecutionFeature'
182
185
  permission :destroy_job_templates, { :job_templates => [:destroy],
183
186
  :'api/v2/job_templates' => [:destroy] }, :resource_type => 'JobTemplate'
184
187
  permission :lock_job_templates, { :job_templates => [:lock, :unlock] }, :resource_type => 'JobTemplate'
@@ -204,6 +207,7 @@ module ForemanRemoteExecution
204
207
  :create_template_invocations,
205
208
  :view_hosts,
206
209
  :view_smart_proxies,
210
+ :view_remote_execution_features,
207
211
  ].freeze
208
212
  MANAGER_PERMISSIONS = USER_PERMISSIONS + [
209
213
  :cancel_job_invocations,
@@ -1,3 +1,3 @@
1
1
  module ForemanRemoteExecution
2
- VERSION = '11.1.1'.freeze
2
+ VERSION = '11.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_remote_execution
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.1.1
4
+ version: 11.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Remote Execution team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-14 00:00:00.000000000 Z
11
+ date: 2024-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface