foreman_remote_execution 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 660715e8af500a6db5a6fb0458a8d5112ea566ea
4
- data.tar.gz: f8fe1dbb889cf28a511bda82a0f570a446e89083
3
+ metadata.gz: 459e92464d713529b6eda8dd33fa924c5ccdde44
4
+ data.tar.gz: a55e090cc66b55664b4b2f628b83c209cb0c0f3f
5
5
  SHA512:
6
- metadata.gz: dcfa54692d092fea8f73dac366e8e4a042e342b93654ce4dc460d2007ec1142290cc6fa09934e86bc6af0c242bb83961314a6ec9e62f4351c8c9346b8c2277df
7
- data.tar.gz: 22f779af5f0b4952df08e55a5863f6c68a2ca620f1c209e517e067229064957952f8820acee0f21ff0e191b481029862c6ee820a6086e00f1f8b112b9fc77e21
6
+ metadata.gz: 282e5f81bf714aab0e020f35e6fe14c7cb82743d7ea77ced55f03322029a370769bb6f254bb9f729a2d7385ed54b10d91bf959fff5e89c764654c6b8ad27d9b5
7
+ data.tar.gz: 88989286761baae23ecba6f6b6242d4648f2ce01cd22af1aad6fc7a6e734a9ca07ce8463fd8318120e4c68f6949aa4c47c24df2defe9ae5407fbba6e1bd980d9
@@ -67,6 +67,10 @@ class TemplateInvocation < ActiveRecord::Base
67
67
  end
68
68
  end
69
69
 
70
+ def template
71
+ JobTemplate.unscoped { super }
72
+ end
73
+
70
74
  def to_action_input
71
75
  { :id => id, :name => template.name }
72
76
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanRemoteExecution
2
- VERSION = '1.3.6'.freeze
2
+ VERSION = '1.3.7'.freeze
3
3
  end
@@ -58,6 +58,18 @@ class JobInvocationTest < ActiveSupport::TestCase
58
58
  it { refute job_invocation.reload.pattern_template_invocations.empty? }
59
59
  it { refute job_invocation.reload.pattern_template_invocations.first.input_values.empty? }
60
60
 
61
+ it "can look up templates not belonging to user's organization" do
62
+ organization = job_invocation.pattern_template_invocations.first.template.organizations.first
63
+ Organization.current = organization
64
+ job_invocation.pattern_template_invocations.first.template.organizations = []
65
+ # The following line raises UndefinedMethod if the user can't look up the template
66
+ job_invocation.pattern_template_invocations.first.template.name
67
+
68
+ # Restore things to original state
69
+ job_invocation.pattern_template_invocations.first.template.organizations = [organization]
70
+ Organization.current = nil
71
+ end
72
+
61
73
  it 'validates required inputs have values' do
62
74
  assert job_invocation.valid?
63
75
  @input_value.destroy
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: 1.3.6
4
+ version: 1.3.7
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: 2017-10-13 00:00:00.000000000 Z
11
+ date: 2017-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface