foreman_openscap 0.8.6 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/api/v2/compliance/arf_reports_controller.rb +3 -3
- data/app/controllers/api/v2/compliance/policies_controller.rb +2 -2
- data/app/controllers/api/v2/compliance/scap_contents_controller.rb +1 -1
- data/app/controllers/api/v2/compliance/tailoring_files_controller.rb +2 -2
- data/app/controllers/arf_reports_controller.rb +2 -2
- data/app/controllers/concerns/foreman_openscap/hosts_controller_extensions.rb +4 -7
- data/app/controllers/policies_controller.rb +3 -3
- data/app/controllers/policy_dashboard_controller.rb +1 -1
- data/app/controllers/scap_contents_controller.rb +2 -2
- data/app/controllers/tailoring_files_controller.rb +2 -2
- data/app/helpers/arf_reports_helper.rb +1 -1
- data/app/helpers/concerns/foreman_openscap/hosts_helper_extensions.rb +4 -11
- data/app/helpers/concerns/foreman_openscap/lookup_keys_helper_extensions.rb +2 -8
- data/app/helpers/policies_helper.rb +1 -1
- data/app/lib/proxy_api/openscap.rb +2 -3
- data/app/models/concerns/foreman_openscap/host_extensions.rb +19 -20
- data/app/models/foreman_openscap/arf_report.rb +8 -12
- data/app/views/scap_contents/_form.html.erb +1 -1
- data/app/views/tailoring_files/_form.html.erb +1 -1
- data/db/migrate/20141013172051_create_scaptimony_policies.rb +1 -1
- data/db/migrate/20141014105333_create_scaptimony_assets.rb +1 -1
- data/db/migrate/20141015092642_create_scaptimony_arf_reports.rb +1 -1
- data/db/migrate/20141015115511_add_arf_report_unique_constraint.rb +1 -1
- data/db/migrate/20141104164201_create_scaptimony_scap_contents.rb +1 -1
- data/db/migrate/20141104171545_create_scaptimony_policy_revisions.rb +1 -1
- data/db/migrate/20141105174625_add_description_to_scaptimony_policy_revisions.rb +1 -1
- data/db/migrate/20141105174834_add_columns_to_scaptimony_policies.rb +1 -1
- data/db/migrate/20141107091756_add_columns_to_scaptimony_scap_contents.rb +1 -1
- data/db/migrate/20141111104519_add_constraint_to_scaptimony_scap_contents.rb +1 -1
- data/db/migrate/20141113221054_create_scaptimony_scap_content_profiles.rb +1 -1
- data/db/migrate/20141116170632_remove_xccdf_profile_from_scaptimony_policies.rb +1 -1
- data/db/migrate/20141116171305_add_profile_to_scaptimony_policies.rb +1 -1
- data/db/migrate/20141118142954_add_constraint_to_scaptimony_policies.rb +1 -1
- data/db/migrate/20141119164918_create_scaptimony_xccdf_results.rb +1 -1
- data/db/migrate/20141119175434_create_scaptimony_xccdf_rules.rb +1 -1
- data/db/migrate/20141119182606_create_scaptimony_xccdf_rule_results.rb +1 -1
- data/db/migrate/20141121120326_create_scaptimony_arf_report_breakdowns.rb +1 -1
- data/db/migrate/20141121164042_replace_arf_report_breakdown_view.rb +1 -1
- data/db/migrate/20141206211151_create_scaptimony_assets_policies.rb +1 -1
- data/db/migrate/20141214112917_add_scap_file_to_scap_content.rb +1 -1
- data/db/migrate/20141216154502_rename_scaptimony_asset_policies.rb +1 -1
- data/db/migrate/20150111085317_polymorph_asset.rb +1 -1
- data/db/migrate/20150112152944_create_scaptimony_arf_report_raws.rb +1 -1
- data/db/migrate/20150114210634_rename_scaptimony_arf_report_raw_raw.rb +1 -1
- data/db/migrate/20150115155947_add_scaptimony_scap_content_digest.rb +1 -1
- data/db/migrate/20150116083129_add_day_of_month_and_cron_line_to_scaptimony_policy.rb +1 -1
- data/db/migrate/20150821100137_migrate_from_scaptimony.rb +1 -1
- data/db/migrate/20150827123826_remove_scaptimony_permissions.rb +1 -1
- data/db/migrate/20150925124959_create_policy_arf_reports.rb +1 -1
- data/db/migrate/20150929124853_add_result_to_logs.rb +1 -1
- data/db/migrate/20150929152345_move_arf_reports_to_reports_table.rb +2 -2
- data/db/migrate/20151118165125_add_size_to_scap_content.rb +1 -1
- data/db/migrate/20151119155419_add_arf_fields_to_message.rb +1 -1
- data/db/migrate/20151120090851_add_openscap_proxy_to_host_and_hostgroup.rb +1 -1
- data/db/migrate/20160830113437_remove_deleted_policy.rb +1 -1
- data/db/migrate/20160925213031_change_scap_widget_names.rb +1 -1
- data/db/migrate/20161109155255_create_tailoring_files.rb +1 -1
- data/db/migrate/20161223153249_add_permissions_to_arf_report.rb +1 -1
- data/db/migrate/20170821081205_rename_mail_notification.foreman_openscap.rb +1 -1
- data/db/migrate/20170830221751_add_index_to_logs_result.rb +1 -1
- data/db/migrate/20171011134112_remove_arf_reports_without_policy.rb +1 -11
- data/db/migrate/20171016125613_add_content_title_unique_constraint.foreman_openscap.rb +1 -1
- data/lib/foreman_openscap/engine.rb +5 -5
- data/lib/foreman_openscap/version.rb +1 -1
- data/test/factories/arf_report_factory.rb +1 -1
- data/test/functional/api/v2/compliance/arf_reports_controller_test.rb +21 -21
- data/test/functional/api/v2/compliance/policies_controller_test.rb +12 -12
- data/test/functional/api/v2/compliance/scap_contents_controller_test.rb +6 -6
- data/test/functional/api/v2/compliance/tailoring_files_controller_test.rb +8 -8
- data/test/functional/arf_reports_controller_test.rb +3 -3
- data/test/functional/openscap_proxies_controller_test.rb +1 -1
- data/test/functional/tailoring_files_controller_test.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8860c02972d0a7286d2d44f6a23c02a79a540ad1
|
4
|
+
data.tar.gz: a0789f0a6842b9609f688208e9a7e9dc7289ba1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f5c7ba56f44c5db6828ffa2d5f6d02fb470e910c8614a11ec68121962f04c96472b5edf6e35e4abd20b29b68b012f3c67c0b192268c98b517f7ee8b63b4286c
|
7
|
+
data.tar.gz: 2b495b6833ec1362dc7dcc386d83e1a3c076c742db55bce19b80301f793b961e8db16535abaf41478d28815086305447dff21ed6c15d5a40626260b4eb7b7f54
|
@@ -10,8 +10,8 @@ module Api
|
|
10
10
|
|
11
11
|
add_smart_proxy_filters :create, :features => 'Openscap'
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
before_action :find_resource, :only => %w[show destroy download download_html]
|
14
|
+
skip_after_action :log_response_body, :only => %w[download download_html]
|
15
15
|
|
16
16
|
def resource_name
|
17
17
|
'::ForemanOpenscap::ArfReport'
|
@@ -49,7 +49,7 @@ module Api
|
|
49
49
|
def create
|
50
50
|
asset = ForemanOpenscap::Helper::get_asset(params[:cname], params[:policy_id])
|
51
51
|
if asset.host.openscap_proxy
|
52
|
-
arf_report = ForemanOpenscap::ArfReport.create_arf(asset, params)
|
52
|
+
arf_report = ForemanOpenscap::ArfReport.create_arf(asset, params.to_unsafe_h)
|
53
53
|
asset.host.refresh_statuses([HostStatus.find_status_by_humanized_name("compliance")])
|
54
54
|
render :json => { :result => :OK, :id => arf_report.id.to_s }
|
55
55
|
else
|
@@ -6,9 +6,9 @@ module Api::V2
|
|
6
6
|
|
7
7
|
add_smart_proxy_filters %i[content tailoring], :features => 'Openscap'
|
8
8
|
|
9
|
-
|
9
|
+
before_action :find_resource, :except => %w[index create]
|
10
10
|
|
11
|
-
|
11
|
+
skip_after_action :log_response_body, :only => [:content]
|
12
12
|
|
13
13
|
def resource_name
|
14
14
|
'::ForemanOpenscap::Policy'
|
@@ -2,7 +2,7 @@ module Api::V2
|
|
2
2
|
module Compliance
|
3
3
|
class ScapContentsController < ::Api::V2::BaseController
|
4
4
|
include Foreman::Controller::Parameters::ScapContent
|
5
|
-
|
5
|
+
before_action :find_resource, :except => %w[index create]
|
6
6
|
|
7
7
|
def resource_name
|
8
8
|
'::ForemanOpenscap::ScapContent'
|
@@ -2,8 +2,8 @@ module Api::V2
|
|
2
2
|
module Compliance
|
3
3
|
class TailoringFilesController < ::Api::V2::BaseController
|
4
4
|
include Foreman::Controller::Parameters::TailoringFile
|
5
|
-
|
6
|
-
|
5
|
+
before_action :find_resource, :except => %w[index create]
|
6
|
+
before_action :openscap_proxy_check, :only => %w[create]
|
7
7
|
|
8
8
|
def resource_name
|
9
9
|
'::ForemanOpenscap::TailoringFile'
|
@@ -2,8 +2,8 @@ class ArfReportsController < ApplicationController
|
|
2
2
|
include Foreman::Controller::AutoCompleteSearch
|
3
3
|
include ForemanOpenscap::ArfReportsControllerCommonExtensions
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
before_action :find_arf_report, :only => %i[show show_html destroy parse_html parse_bzip download_html]
|
6
|
+
before_action :find_multiple, :only => %i[delete_multiple submit_delete_multiple]
|
7
7
|
|
8
8
|
def model_of_controller
|
9
9
|
::ForemanOpenscap::ArfReport
|
@@ -1,17 +1,14 @@
|
|
1
1
|
module ForemanOpenscap
|
2
2
|
module HostsControllerExtensions
|
3
|
-
|
4
|
-
|
5
|
-
included do
|
6
|
-
alias_method_chain :process_hostgroup, :openscap
|
7
|
-
self::AJAX_REQUESTS << 'openscap_proxy_changed'
|
3
|
+
def self.prepended(base)
|
4
|
+
base::AJAX_REQUESTS << 'openscap_proxy_changed'
|
8
5
|
end
|
9
6
|
|
10
|
-
def
|
7
|
+
def process_hostgroup
|
11
8
|
@hostgroup = Hostgroup.find(params[:host][:hostgroup_id]) if params[:host][:hostgroup_id].to_i > 0
|
12
9
|
return head(:not_found) unless @hostgroup
|
13
10
|
@openscap_proxy = @hostgroup.openscap_proxy
|
14
|
-
|
11
|
+
super
|
15
12
|
end
|
16
13
|
end
|
17
14
|
end
|
@@ -2,9 +2,9 @@ class PoliciesController < ApplicationController
|
|
2
2
|
include Foreman::Controller::AutoCompleteSearch
|
3
3
|
include Foreman::Controller::Parameters::Policy
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
before_action :find_by_id, :only => %i[show edit update parse destroy]
|
6
|
+
before_action :find_multiple, :only => %i[select_multiple_hosts update_multiple_hosts disassociate_multiple_hosts remove_policy_from_multiple_hosts]
|
7
|
+
before_action :find_tailoring_file, :only => [:tailoring_file_selected]
|
8
8
|
|
9
9
|
def model_of_controller
|
10
10
|
::ForemanOpenscap::Policy
|
@@ -2,8 +2,8 @@ class ScapContentsController < ApplicationController
|
|
2
2
|
include Foreman::Controller::AutoCompleteSearch
|
3
3
|
include Foreman::Controller::Parameters::ScapContent
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
before_action :handle_file_upload, :only => %i[create update]
|
6
|
+
before_action :find_by_id, :only => %i[show edit update destroy]
|
7
7
|
|
8
8
|
def model_of_controller
|
9
9
|
::ForemanOpenscap::ScapContent
|
@@ -2,8 +2,8 @@ class TailoringFilesController < ApplicationController
|
|
2
2
|
include Foreman::Controller::AutoCompleteSearch
|
3
3
|
include Foreman::Controller::Parameters::TailoringFile
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
before_action :find_tailoring_file, :only => %i[destroy update edit xml]
|
6
|
+
before_action :handle_file_upload, :only => %i[create update]
|
7
7
|
|
8
8
|
def model_of_controller
|
9
9
|
::ForemanOpenscap::TailoringFile
|
@@ -59,7 +59,7 @@ module ArfReportsHelper
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def reported_info(arf_report)
|
62
|
-
msg = _("Reported at %s") % arf_report.reported_at
|
62
|
+
msg = _("Reported at %s") % date_time_absolute(arf_report.reported_at)
|
63
63
|
msg << _(" for policy %s") % display_link_if_authorized(arf_report.policy.name, hash_for_edit_policy_path(:id => arf_report.policy.id)) if arf_report.policy
|
64
64
|
return msg.html_safe unless arf_report.openscap_proxy
|
65
65
|
msg += _(" through %s") % openscap_proxy_link(arf_report)
|
@@ -1,19 +1,12 @@
|
|
1
1
|
module ForemanOpenscap
|
2
2
|
module HostsHelperExtensions
|
3
|
-
|
4
|
-
|
5
|
-
included do
|
6
|
-
alias_method_chain :multiple_actions, :scap
|
7
|
-
alias_method_chain :name_column, :scap
|
8
|
-
end
|
9
|
-
|
10
|
-
def multiple_actions_with_scap
|
11
|
-
multiple_actions_without_scap + [[_('Assign Compliance Policy'), select_multiple_hosts_policies_path],
|
3
|
+
def multiple_actions
|
4
|
+
super + [[_('Assign Compliance Policy'), select_multiple_hosts_policies_path],
|
12
5
|
[_('Unassign Compliance Policy'), disassociate_multiple_hosts_policies_path]]
|
13
6
|
end
|
14
7
|
|
15
|
-
def
|
16
|
-
record.nil? ? _('Host is deleted') :
|
8
|
+
def name_column(record)
|
9
|
+
record.nil? ? _('Host is deleted') : super(record)
|
17
10
|
end
|
18
11
|
end
|
19
12
|
end
|
@@ -1,14 +1,8 @@
|
|
1
1
|
module ForemanOpenscap
|
2
2
|
module LookupKeysHelperExtensions
|
3
|
-
|
4
|
-
|
5
|
-
included do
|
6
|
-
alias_method_chain :overridable_lookup_keys, :scap
|
7
|
-
end
|
8
|
-
|
9
|
-
def overridable_lookup_keys_with_scap(klass, obj)
|
3
|
+
def overridable_lookup_keys(klass, obj)
|
10
4
|
return [] if klass.name == "foreman_scap_client"
|
11
|
-
|
5
|
+
super klass, obj
|
12
6
|
end
|
13
7
|
end
|
14
8
|
end
|
@@ -88,7 +88,7 @@ module PoliciesHelper
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def previous_link(form)
|
91
|
-
previous = content_tag(:span, :class => 'glyphicon glyphicon-chevron-left')
|
91
|
+
previous = content_tag(:span, :class => 'glyphicon glyphicon-chevron-left')
|
92
92
|
content_tag(:div, :class => 'pull-left') do
|
93
93
|
link_to(previous.html_safe, '#', :class => 'btn btn-default', :onclick => "previous_step('#{@policy.previous_step}')")
|
94
94
|
end
|
@@ -51,9 +51,8 @@ module ::ProxyAPI
|
|
51
51
|
begin
|
52
52
|
parse(delete("arf/#{report.id}/#{cname}/#{report.reported_at.to_i}/#{report.policy_arf_report.digest}"))
|
53
53
|
rescue => e
|
54
|
-
|
55
|
-
logger.
|
56
|
-
report.errors.add(:base, msg)
|
54
|
+
logger.error "Failed to destroy arf report with id #{report.id} on Smart Proxy"
|
55
|
+
logger.debug e.backtrace.join("\n\t")
|
57
56
|
false
|
58
57
|
end
|
59
58
|
end
|
@@ -1,55 +1,54 @@
|
|
1
1
|
module ForemanOpenscap
|
2
2
|
module HostExtensions
|
3
|
-
extend ActiveSupport::Concern
|
4
3
|
::Host::Managed::Jail.allow :policies_enc
|
5
4
|
|
6
|
-
|
7
|
-
has_one :asset, :as => :assetable, :class_name => "::ForemanOpenscap::Asset"
|
8
|
-
has_many :asset_policies, :through => :asset, :class_name => "::ForemanOpenscap::AssetPolicy"
|
9
|
-
has_many :policies, :through => :asset_policies, :class_name => "::ForemanOpenscap::Policy"
|
10
|
-
has_many :arf_reports, :class_name => '::ForemanOpenscap::ArfReport', :foreign_key => :host_id
|
11
|
-
has_one :compliance_status_object, :class_name => '::ForemanOpenscap::ComplianceStatus', :foreign_key => 'host_id'
|
5
|
+
def self.prepended(base)
|
6
|
+
base.has_one :asset, :as => :assetable, :class_name => "::ForemanOpenscap::Asset"
|
7
|
+
base.has_many :asset_policies, :through => :asset, :class_name => "::ForemanOpenscap::AssetPolicy"
|
8
|
+
base.has_many :policies, :through => :asset_policies, :class_name => "::ForemanOpenscap::Policy"
|
9
|
+
base.has_many :arf_reports, :class_name => '::ForemanOpenscap::ArfReport', :foreign_key => :host_id
|
10
|
+
base.has_one :compliance_status_object, :class_name => '::ForemanOpenscap::ComplianceStatus', :foreign_key => 'host_id'
|
12
11
|
|
13
|
-
scoped_search :relation => :policies, :on => :name, :complete_value => true, :rename => :compliance_policy,
|
12
|
+
base.scoped_search :relation => :policies, :on => :name, :complete_value => true, :rename => :compliance_policy,
|
14
13
|
:only_explicit => true, :operators => ['= '], :ext_method => :search_by_policy_name
|
15
14
|
|
16
|
-
scoped_search :relation => :policies, :on => :id, :complete_value => false, :rename => :compliance_policy_id,
|
15
|
+
base.scoped_search :relation => :policies, :on => :id, :complete_value => false, :rename => :compliance_policy_id,
|
17
16
|
:only_explicit => true, :operators => ['= ', '!= '], :ext_method => :search_by_policy_id
|
18
17
|
|
19
|
-
scoped_search :relation => :policies, :on => :name, :complete_value => true, :rename => :compliance_report_missing_for,
|
18
|
+
base.scoped_search :relation => :policies, :on => :name, :complete_value => true, :rename => :compliance_report_missing_for,
|
20
19
|
:only_explicit => true, :operators => ['= ', '!= '], :ext_method => :search_by_missing_arf
|
21
20
|
|
22
|
-
scoped_search :relation => :compliance_status_object, :on => :status, :rename => :compliance_status,
|
21
|
+
base.scoped_search :relation => :compliance_status_object, :on => :status, :rename => :compliance_status,
|
23
22
|
:complete_value => { :compliant => ::ForemanOpenscap::ComplianceStatus::COMPLIANT,
|
24
23
|
:incompliant => ::ForemanOpenscap::ComplianceStatus::INCOMPLIANT,
|
25
24
|
:inconclusive => ::ForemanOpenscap::ComplianceStatus::INCONCLUSIVE }
|
26
|
-
after_update :puppetrun!, :if => ->(host) { Setting[:puppetrun] && host.changed.include?('openscap_proxy_id') }
|
25
|
+
base.after_update :puppetrun!, :if => ->(host) { Setting[:puppetrun] && host.changed.include?('openscap_proxy_id') }
|
27
26
|
|
28
|
-
scope :comply_with, lambda { |policy|
|
27
|
+
base.scope :comply_with, lambda { |policy|
|
29
28
|
joins(:arf_reports).merge(ArfReport.latest_of_policy(policy)).merge(ArfReport.passed)
|
30
29
|
}
|
31
30
|
|
32
|
-
scope :incomply_with, lambda { |policy|
|
31
|
+
base.scope :incomply_with, lambda { |policy|
|
33
32
|
joins(:arf_reports).merge(ArfReport.latest_of_policy(policy)).merge(ArfReport.failed)
|
34
33
|
}
|
35
34
|
|
36
|
-
scope :inconclusive_with, lambda { |policy|
|
35
|
+
base.scope :inconclusive_with, lambda { |policy|
|
37
36
|
joins(:arf_reports).merge(ArfReport.latest_of_policy(policy)).merge(ArfReport.othered)
|
38
37
|
}
|
39
38
|
|
40
|
-
scope :policy_reports_missing, lambda { |policy|
|
39
|
+
base.scope :policy_reports_missing, lambda { |policy|
|
41
40
|
search_for("compliance_report_missing_for = \"#{policy.name}\"")
|
42
41
|
}
|
43
42
|
|
44
|
-
scope :assigned_to_policy, lambda { |policy|
|
43
|
+
base.scope :assigned_to_policy, lambda { |policy|
|
45
44
|
search_for("compliance_policy = \"#{policy.name}\"")
|
46
45
|
}
|
47
46
|
|
48
|
-
|
47
|
+
base.send :extend, ClassMethods
|
49
48
|
end
|
50
49
|
|
51
|
-
def
|
52
|
-
|
50
|
+
def inherited_attributes
|
51
|
+
super.concat(%w[openscap_proxy_id])
|
53
52
|
end
|
54
53
|
|
55
54
|
def policies=(policies)
|
@@ -189,22 +189,18 @@ module ForemanOpenscap
|
|
189
189
|
end
|
190
190
|
|
191
191
|
def destroy_from_proxy
|
192
|
-
if
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
192
|
+
if host
|
193
|
+
begin
|
194
|
+
openscap_proxy_api.destroy_report(self, ForemanOpenscap::Helper::find_name_or_uuid_by_host(host))
|
195
|
+
rescue Foreman::Exception => e
|
196
|
+
logger.error "Failed to delete report with id #{id} from proxy, cause: #{e.message}"
|
197
|
+
logger.debug e.backtrace.join("\n\t")
|
198
|
+
end
|
198
199
|
else
|
199
|
-
|
200
|
+
logger.error "Failed to delete report with id #{id} from proxy, no host associated with report"
|
200
201
|
end
|
201
202
|
end
|
202
203
|
|
203
|
-
def destroy_from_proxy_warning(associated)
|
204
|
-
logger.warn "Skipping deletion of report with id #{id} from proxy, no #{associated} associated with report"
|
205
|
-
true
|
206
|
-
end
|
207
|
-
|
208
204
|
def self.newline_to_space(string)
|
209
205
|
string.gsub(/ *\n+/, " ")
|
210
206
|
end
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<div class="tab-content">
|
18
18
|
<div class="tab-pane active" id="primary">
|
19
19
|
<%= text_f(f, :title) %>
|
20
|
-
<%= file_field_f f, :scap_file, :
|
20
|
+
<%= file_field_f f, :scap_file, :file_name => @scap_content.original_filename , :label_help => _("SCAP DataStream file") %>
|
21
21
|
</div>
|
22
22
|
<%= render 'taxonomies/loc_org_tabs', :f => f, :obj => @scap_content %>
|
23
23
|
<%= submit_or_cancel f %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<div class="tab-content">
|
18
18
|
<div class="tab-pane active" id="primary">
|
19
19
|
<%= text_f(f, :name) %>
|
20
|
-
<%= file_field_f f, :scap_file, :
|
20
|
+
<%= file_field_f f, :scap_file, :file_name => @tailoring_file.original_filename, :label_help => _("DataStream Tailoring file") %>
|
21
21
|
</div>
|
22
22
|
<%= render 'taxonomies/loc_org_tabs', :f => f, :obj => @tailoring_file %>
|
23
23
|
<%= submit_or_cancel f %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddArfReportUniqueConstraint < ActiveRecord::Migration
|
1
|
+
class AddArfReportUniqueConstraint < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
add_index :scaptimony_arf_reports, %i[asset_id policy_id date digest],
|
4
4
|
:unique => true, :name => :index_scaptimony_arf_reports_unique_set
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddColumnsToScaptimonyScapContents < ActiveRecord::Migration
|
1
|
+
class AddColumnsToScaptimonyScapContents < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
add_column :scaptimony_scap_contents, :title, :string
|
4
4
|
add_column :scaptimony_scap_contents, :original_filename, :string
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddProfileToScaptimonyPolicies < ActiveRecord::Migration
|
1
|
+
class AddProfileToScaptimonyPolicies < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
# add_reference :scaptimony_policies, :scap_content_profile, index: true
|
4
4
|
add_column :scaptimony_policies, :scap_content_profile_id, :integer, :references => :scap_content_profile
|