foreman_openscap 4.0.0 → 4.0.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afb07ec68598ddfebdea1a16d50489cb5ca88cd7e5e0eb0294591704ac41d06d
|
4
|
+
data.tar.gz: 2c9aeed9bd9244263002370796e1439801dbe29183f4f19c99bc33d5aa5168b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93afb936e476d4b8ddc3c616ec5820b7609cf8fefc59478ac7011b78edef1e33946d194ba4a47dde89acf19dcbc6d6fd74f6e5ba501502ae9a1ef7663e1b77ed
|
7
|
+
data.tar.gz: c5aeec2a9ceee0c88d40e279dda82316e4a13eeb5e4b31856fa2625b20e994cf10e13b338286b5550e6d9ba107c78de0049d6587610404c31d2c3d5ecbc7b85f
|
@@ -90,12 +90,14 @@ module Api
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def find_resources_before_create
|
93
|
-
|
94
|
-
|
93
|
+
policy_id = params[:policy_id].to_i
|
94
|
+
|
95
|
+
unless ForemanOpenscap::Policy.where(:id => policy_id).any?
|
96
|
+
upload_fail(_("Policy with id %s not found.") % policy_id)
|
95
97
|
return
|
96
98
|
end
|
97
99
|
|
98
|
-
@asset = ForemanOpenscap::Helper::get_asset(params[:cname],
|
100
|
+
@asset = ForemanOpenscap::Helper::get_asset(params[:cname], policy_id)
|
99
101
|
|
100
102
|
unless @asset
|
101
103
|
upload_fail(_('Could not find host identified by: %s') % params[:cname])
|
@@ -2,7 +2,7 @@ module ForemanOpenscap::Helper
|
|
2
2
|
def self.get_asset(cname, policy_id)
|
3
3
|
asset = find_host_by_name_or_uuid(cname)&.get_asset
|
4
4
|
return unless asset
|
5
|
-
asset.policy_ids += [policy_id]
|
5
|
+
asset.policy_ids += [policy_id] unless asset.policy_ids.include?(policy_id)
|
6
6
|
asset
|
7
7
|
end
|
8
8
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_openscap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- slukasik@redhat.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -348,7 +348,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
348
348
|
- !ruby/object:Gem::Version
|
349
349
|
version: '0'
|
350
350
|
requirements: []
|
351
|
-
rubygems_version: 3.
|
351
|
+
rubygems_version: 3.1.2
|
352
352
|
signing_key:
|
353
353
|
specification_version: 4
|
354
354
|
summary: Foreman plug-in for displaying OpenSCAP audit reports
|
@@ -380,7 +380,6 @@ test_files:
|
|
380
380
|
- test/helpers/arf_report_dashboard_helper_test.rb
|
381
381
|
- test/helpers/policy_dashboard_helper_test.rb
|
382
382
|
- test/lib/foreman_openscap/bulk_upload_test.rb
|
383
|
-
- test/test_plugin_helper.rb
|
384
383
|
- test/unit/arf_report_status_calculator_test.rb
|
385
384
|
- test/unit/arf_report_test.rb
|
386
385
|
- test/unit/compliance_status_test.rb
|
@@ -389,7 +388,6 @@ test_files:
|
|
389
388
|
- test/unit/message_cleaner_test.rb
|
390
389
|
- test/unit/openscap_host_test.rb
|
391
390
|
- test/unit/policy_mailer_test.rb
|
392
|
-
- test/unit/policy_test.rb
|
393
391
|
- test/unit/scap_content_test.rb
|
394
392
|
- test/unit/services/config_name_service_test.rb
|
395
393
|
- test/unit/services/hostgroup_overrider_test.rb
|
@@ -397,3 +395,5 @@ test_files:
|
|
397
395
|
- test/unit/services/report_dashboard/data_test.rb
|
398
396
|
- test/unit/services/tailoring_files_proxy_check_test.rb
|
399
397
|
- test/unit/tailoring_file_test.rb
|
398
|
+
- test/unit/policy_test.rb
|
399
|
+
- test/test_plugin_helper.rb
|