foreman_openscap 0.7.2 → 0.7.3

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/api/v2/compliance/arf_reports_controller.rb +2 -2
  3. data/app/controllers/api/v2/compliance/policies_controller.rb +2 -2
  4. data/app/controllers/api/v2/compliance/scap_contents_controller.rb +1 -1
  5. data/app/controllers/api/v2/compliance/tailoring_files_controller.rb +2 -2
  6. data/app/controllers/arf_reports_controller.rb +4 -4
  7. data/app/controllers/concerns/foreman/controller/parameters/policy.rb +1 -1
  8. data/app/controllers/openscap_proxies_controller.rb +6 -5
  9. data/app/controllers/policies_controller.rb +2 -2
  10. data/app/controllers/scap_contents_controller.rb +2 -2
  11. data/app/controllers/tailoring_files_controller.rb +2 -2
  12. data/app/helpers/policies_helper.rb +4 -0
  13. data/app/models/concerns/foreman_openscap/host_extensions.rb +1 -1
  14. data/app/models/concerns/foreman_openscap/hostgroup_extensions.rb +9 -0
  15. data/app/models/concerns/foreman_openscap/log_extensions.rb +1 -1
  16. data/app/models/foreman_openscap/arf_report.rb +1 -1
  17. data/app/models/foreman_openscap/asset.rb +1 -1
  18. data/app/models/foreman_openscap/asset_policy.rb +1 -1
  19. data/app/models/foreman_openscap/policy.rb +9 -9
  20. data/app/models/foreman_openscap/policy_revision.rb +1 -1
  21. data/app/models/foreman_openscap/scap_content.rb +1 -1
  22. data/app/models/foreman_openscap/scap_content_profile.rb +1 -1
  23. data/app/models/foreman_openscap/tailoring_file.rb +1 -1
  24. data/app/views/policies/steps/_create_policy_form.html.erb +1 -1
  25. data/app/views/smart_proxies/_openscap_spool.html.erb +5 -1
  26. data/lib/foreman_openscap/engine.rb +22 -23
  27. data/lib/foreman_openscap/version.rb +1 -1
  28. data/locale/de/foreman_openscap.po +13 -4
  29. data/locale/en_GB/foreman_openscap.po +13 -4
  30. data/locale/es/foreman_openscap.po +13 -4
  31. data/locale/foreman_openscap.pot +60 -44
  32. data/locale/fr/foreman_openscap.po +13 -4
  33. data/locale/gl/foreman_openscap.po +13 -4
  34. data/locale/it/foreman_openscap.po +13 -4
  35. data/locale/ja/foreman_openscap.po +13 -4
  36. data/locale/ko/foreman_openscap.po +13 -4
  37. data/locale/pt_BR/foreman_openscap.po +13 -4
  38. data/locale/ru/foreman_openscap.po +13 -4
  39. data/locale/sv_SE/foreman_openscap.po +13 -4
  40. data/locale/zh_CN/foreman_openscap.po +13 -4
  41. data/locale/zh_TW/foreman_openscap.po +13 -4
  42. data/test/test_plugin_helper.rb +1 -1
  43. metadata +2 -3
  44. data/app/controllers/concerns/foreman_openscap/hostgroups_controller_extensions.rb +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ab167c73f11d1deec80d98b87c0c75a5c2df119
4
- data.tar.gz: 2904ab063872e0ba90daca541917ebbde98d0927
3
+ metadata.gz: 62780a60133d6dcf012e957f267d266dc6d68409
4
+ data.tar.gz: dc36ea5fabb2ec217b204e0b5ed6c75d38624bd0
5
5
  SHA512:
6
- metadata.gz: ff2cdd7e0bedaabf6d5d5f76981afdf07019a8eee6faddd68b9ef88f349c4eef41b02994d04a4fd32894135dca037cedadcb24d5091a28407bdc3e2cc61f057d
7
- data.tar.gz: 1661d0a384c8c66285cb2a4385aa47aeaccfdc4e4b8527a0eaca9cbb867fae5310e14b6d84f8dc1f687f7a55b37f30c0a861f6395bb309f7ade56960e3e9ba5b
6
+ metadata.gz: 4328bea43538ae9114c5a9ae37d61171b882d3650e8856cf19a6b60f0ffb5c2c53d516f9d13610f7bfa7f011ba88c50f93406cc680956d9a94f0f4af393e766c
7
+ data.tar.gz: 69bf2838d06b0a7b3359ddaf3cbe2e4827d31a9fa77af51ce6d8fea12d939ce20b589527d182ad336ce3dc5d922079a76ceaac7b92aa1ec4ae5bcf8e09832a2e
@@ -11,8 +11,8 @@ module Api
11
11
 
12
12
  add_smart_proxy_filters :create, :features => 'Openscap'
13
13
 
14
- before_filter :find_resource, :only => %w(show destroy download download_html)
15
- skip_after_filter :log_response_body, :only => %w(download download_html)
14
+ before_filter :find_resource, :only => %w[show destroy download download_html]
15
+ skip_after_filter :log_response_body, :only => %w[download download_html]
16
16
 
17
17
  def resource_name
18
18
  '::ForemanOpenscap::ArfReport'
@@ -4,9 +4,9 @@ module Api::V2
4
4
  include Foreman::Controller::SmartProxyAuth
5
5
  include Foreman::Controller::Parameters::PolicyApi
6
6
 
7
- add_smart_proxy_filters %i(content tailoring), :features => 'Openscap'
7
+ add_smart_proxy_filters %i[content tailoring], :features => 'Openscap'
8
8
 
9
- before_filter :find_resource, :except => %w(index create)
9
+ before_filter :find_resource, :except => %w[index create]
10
10
 
11
11
  skip_after_filter :log_response_body, :only => [:content]
12
12
 
@@ -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
- before_filter :find_resource, :except => %w(index create)
5
+ before_filter :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
- before_filter :find_resource, :except => %w(index create)
6
- before_filter :openscap_proxy_check, :only => %w(create)
5
+ before_filter :find_resource, :except => %w[index create]
6
+ before_filter :openscap_proxy_check, :only => %w[create]
7
7
 
8
8
  def resource_name
9
9
  '::ForemanOpenscap::TailoringFile'
@@ -2,15 +2,15 @@ class ArfReportsController < ApplicationController
2
2
  include Foreman::Controller::AutoCompleteSearch
3
3
  include ForemanOpenscap::ArfReportsControllerCommonExtensions
4
4
 
5
- before_filter :find_arf_report, :only => %i(show show_html destroy parse_html parse_bzip download_html)
6
- before_filter :find_multiple, :only => %i(delete_multiple submit_delete_multiple)
5
+ before_filter :find_arf_report, :only => %i[show show_html destroy parse_html parse_bzip download_html]
6
+ before_filter :find_multiple, :only => %i[delete_multiple submit_delete_multiple]
7
7
 
8
8
  def model_of_controller
9
9
  ::ForemanOpenscap::ArfReport
10
10
  end
11
11
 
12
12
  def index
13
- @arf_reports = resource_base.includes(:host => %i(policies last_report_object host_statuses))
13
+ @arf_reports = resource_base.includes(:host => %i[policies last_report_object host_statuses])
14
14
  .search_for(params[:search], :order => params[:order])
15
15
  .paginate(:page => params[:page], :per_page => params[:per_page])
16
16
  end
@@ -75,7 +75,7 @@ class ArfReportsController < ApplicationController
75
75
  private
76
76
 
77
77
  def find_arf_report
78
- @arf_report = resource_base.includes(:logs => %i(message source)).find(params[:id])
78
+ @arf_report = resource_base.includes(:logs => %i[message source]).find(params[:id])
79
79
  end
80
80
 
81
81
  def find_multiple
@@ -5,7 +5,7 @@ module Foreman::Controller::Parameters::Policy
5
5
  class_methods do
6
6
  def policy_params_filter
7
7
  Foreman::ParameterFilter.new(::ForemanOpenscap::Policy).tap do |filter|
8
- filter.permit(%i(current_step wizard_initiated) + filter_params_list)
8
+ filter.permit(%i[current_step wizard_initiated] + filter_params_list)
9
9
  end
10
10
  end
11
11
  end
@@ -22,10 +22,11 @@ class OpenscapProxiesController < ApplicationController
22
22
  end
23
23
 
24
24
  def find_spool_error
25
- @smart_proxy.statuses[:logs]
26
- .logs
27
- .log_entries
28
- .reverse
29
- .find { |entry| entry["level"] == "ERROR" && entry["message"].start_with?("Failed to parse Arf Report") }
25
+ log_status = @smart_proxy.statuses[:logs]
26
+ return {} unless log_status
27
+ log_status.logs
28
+ .log_entries
29
+ .reverse
30
+ .find { |entry| entry["level"] == "ERROR" && entry["message"].start_with?("Failed to parse Arf Report") }
30
31
  end
31
32
  end
@@ -2,8 +2,8 @@ class PoliciesController < ApplicationController
2
2
  include Foreman::Controller::AutoCompleteSearch
3
3
  include Foreman::Controller::Parameters::Policy
4
4
 
5
- before_filter :find_by_id, :only => %i(show edit update parse destroy)
6
- before_filter :find_multiple, :only => %i(select_multiple_hosts update_multiple_hosts disassociate_multiple_hosts remove_policy_from_multiple_hosts)
5
+ before_filter :find_by_id, :only => %i[show edit update parse destroy]
6
+ before_filter :find_multiple, :only => %i[select_multiple_hosts update_multiple_hosts disassociate_multiple_hosts remove_policy_from_multiple_hosts]
7
7
  before_filter :find_tailoring_file, :only => [:tailoring_file_selected]
8
8
 
9
9
  def model_of_controller
@@ -2,8 +2,8 @@ class ScapContentsController < ApplicationController
2
2
  include Foreman::Controller::AutoCompleteSearch
3
3
  include Foreman::Controller::Parameters::ScapContent
4
4
 
5
- before_filter :handle_file_upload, :only => %i(create update)
6
- before_filter :find_by_id, :only => %i(show edit update destroy)
5
+ before_filter :handle_file_upload, :only => %i[create update]
6
+ before_filter :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
- before_filter :find_tailoring_file, :only => %i(destroy update edit xml)
6
- before_filter :handle_file_upload, :only => %i(create update)
5
+ before_filter :find_tailoring_file, :only => %i[destroy update edit xml]
6
+ before_filter :handle_file_upload, :only => %i[create update]
7
7
 
8
8
  def model_of_controller
9
9
  ::ForemanOpenscap::TailoringFile
@@ -97,4 +97,8 @@ module PoliciesHelper
97
97
  def days_of_week_hash
98
98
  Hash[*Date::DAYNAMES.map { |day| [day.downcase, day] }.flatten]
99
99
  end
100
+
101
+ def translate_steps(policy)
102
+ policy.steps.map { |step| _(step) }
103
+ end
100
104
  end
@@ -46,7 +46,7 @@ module ForemanOpenscap
46
46
  end
47
47
 
48
48
  def inherited_attributes_with_openscap
49
- inherited_attributes_without_openscap.concat(%w(openscap_proxy_id))
49
+ inherited_attributes_without_openscap.concat(%w[openscap_proxy_id])
50
50
  end
51
51
 
52
52
  def policies=(policies)
@@ -16,6 +16,15 @@ module ForemanOpenscap
16
16
  end.uniq
17
17
  end
18
18
 
19
+ def openscap_proxy
20
+ return super if ancestry.nil? || self.openscap_proxy_id.present?
21
+ ::SmartProxy.find_by(:id => inherited_openscap_proxy_id)
22
+ end
23
+
24
+ def inherited_openscap_proxy_id
25
+ inherited_ancestry_attribute(:openscap_proxy_id)
26
+ end
27
+
19
28
  unless defined?(Katello::System)
20
29
  private
21
30
 
@@ -2,7 +2,7 @@ module ForemanOpenscap
2
2
  module LogExtensions
3
3
  extend ActiveSupport::Concern
4
4
  included do
5
- SCAP_RESULT = %w(pass fail error unknown notapplicable notchecked notselected informational fixed).freeze
5
+ SCAP_RESULT = %w[pass fail error unknown notapplicable notchecked notselected informational fixed].freeze
6
6
  validate :scap_result
7
7
  end
8
8
 
@@ -6,7 +6,7 @@ module ForemanOpenscap
6
6
  include OpenscapProxyExtensions
7
7
 
8
8
  # attr_accessible :host_id, :reported_at, :status, :metrics
9
- METRIC = %w(passed othered failed).freeze
9
+ METRIC = %w[passed othered failed].freeze
10
10
  BIT_NUM = 10
11
11
  MAX = (1 << BIT_NUM) - 1
12
12
 
@@ -1,5 +1,5 @@
1
1
  module ForemanOpenscap
2
- class Asset < ActiveRecord::Base
2
+ class Asset < ApplicationRecord
3
3
  has_many :asset_policies
4
4
  has_many :policies, :through => :asset_policies
5
5
  belongs_to :assetable, :polymorphic => true
@@ -1,5 +1,5 @@
1
1
  module ForemanOpenscap
2
- class AssetPolicy < ActiveRecord::Base
2
+ class AssetPolicy < ApplicationRecord
3
3
  belongs_to :policy
4
4
  belongs_to :asset
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module ForemanOpenscap
2
- class Policy < ActiveRecord::Base
2
+ class Policy < ApplicationRecord
3
3
  include Authorizable
4
4
  include Taxonomix
5
5
  attr_writer :current_step, :wizard_initiated
@@ -24,7 +24,7 @@ module ForemanOpenscap
24
24
 
25
25
  validates :name, :presence => true, :uniqueness => true, :length => { :maximum => 255 }
26
26
  validate :ensure_needed_puppetclasses
27
- validates :period, :inclusion => {:in => %w(weekly monthly custom), :message => _('is not a valid value')},
27
+ validates :period, :inclusion => {:in => %w[weekly monthly custom], :message => _('is not a valid value')},
28
28
  :if => Proc.new { |policy| policy.should_validate?('Schedule') }
29
29
 
30
30
  validates :scap_content_id, presence: true, if: Proc.new { |policy| policy.should_validate?('SCAP Content') }
@@ -98,10 +98,10 @@ module ForemanOpenscap
98
98
  end
99
99
 
100
100
  def steps
101
- base_steps = ['Create policy', 'SCAP Content', 'Schedule']
102
- base_steps << 'Locations' if SETTINGS[:locations_enabled]
103
- base_steps << 'Organizations' if SETTINGS[:organizations_enabled]
104
- base_steps << 'Hostgroups' #always be last.
101
+ base_steps = [N_('Create policy'), N_('SCAP Content'), N_('Schedule')]
102
+ base_steps << N_('Locations') if SETTINGS[:locations_enabled]
103
+ base_steps << N_('Organizations') if SETTINGS[:organizations_enabled]
104
+ base_steps << N_('Hostgroups') #always be last.
105
105
  end
106
106
 
107
107
  def current_step
@@ -199,11 +199,11 @@ module ForemanOpenscap
199
199
  def update_period_attrs
200
200
  case period
201
201
  when 'monthly'
202
- erase_period_attrs(%w(cron_line weekday))
202
+ erase_period_attrs(%w[cron_line weekday])
203
203
  when 'weekly'
204
- erase_period_attrs(%w(cron_line day_of_month))
204
+ erase_period_attrs(%w[cron_line day_of_month])
205
205
  when 'custom'
206
- erase_period_attrs(%w(weekday day_of_month))
206
+ erase_period_attrs(%w[weekday day_of_month])
207
207
  end
208
208
  end
209
209
 
@@ -1,5 +1,5 @@
1
1
  module ForemanOpenscap
2
- class PolicyRevision < ActiveRecord::Base
2
+ class PolicyRevision < ApplicationRecord
3
3
  belongs_to :policy
4
4
  belongs_to :scap_content
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module ForemanOpenscap
2
- class ScapContent < ActiveRecord::Base
2
+ class ScapContent < ApplicationRecord
3
3
  include Authorizable
4
4
  include Taxonomix
5
5
  include DataStreamContent
@@ -1,5 +1,5 @@
1
1
  module ForemanOpenscap
2
- class ScapContentProfile < ActiveRecord::Base
2
+ class ScapContentProfile < ApplicationRecord
3
3
  belongs_to :scap_content
4
4
  has_many :policies
5
5
  belongs_to :tailoring_file
@@ -1,5 +1,5 @@
1
1
  module ForemanOpenscap
2
- class TailoringFile < ActiveRecord::Base
2
+ class TailoringFile < ApplicationRecord
3
3
  include Authorizable
4
4
  include Taxonomix
5
5
  include DataStreamContent
@@ -1,5 +1,5 @@
1
1
  <div class="tab-pane <%= show_partial_wizard(step) %>" id="create-policy">
2
- <%= wizard_header @policy.step_index, *@policy.steps %>
2
+ <%= wizard_header @policy.step_index, *translate_steps(@policy) %>
3
3
  <%= text_f(f, :name) %>
4
4
  <%= text_f(f, :description, :size => "col-md-8" ) %>
5
5
  </div>
@@ -1,8 +1,12 @@
1
1
  <span>
2
- <% if last_error %>
2
+ <% if last_error && last_error.has_key?('timestamp') %>
3
3
  <span>
4
4
  <a href="#logs" onclick="findSpoolLogs();"><%= _('%s ago') % time_ago_in_words(Time.at(last_error["timestamp"])) %></a>
5
5
  </span>
6
+ <% elsif !last_error.nil? && last_error.empty? %>
7
+ <span>
8
+ <%= _('Enable "logs" feature on proxy to search for errors') %>
9
+ </span>
6
10
  <% else %>
7
11
  <%= _('None found') %>
8
12
  <% end %>
@@ -51,42 +51,42 @@ module ForemanOpenscap
51
51
 
52
52
  # Add permissions
53
53
  security_block :foreman_openscap do
54
- permission :view_arf_reports, {:arf_reports => %i(index show parse_html show_html
55
- parse_bzip auto_complete_search download_html),
56
- 'api/v2/compliance/arf_reports' => %i(index show download download_html),
54
+ permission :view_arf_reports, {:arf_reports => %i[index show parse_html show_html
55
+ parse_bzip auto_complete_search download_html],
56
+ 'api/v2/compliance/arf_reports' => %i[index show download download_html],
57
57
  :compliance_hosts => [:show]},
58
58
  :resource_type => 'ForemanOpenscap::ArfReport'
59
- permission :destroy_arf_reports, {:arf_reports => %i(destroy delete_multiple submit_delete_multiple),
59
+ permission :destroy_arf_reports, {:arf_reports => %i[destroy delete_multiple submit_delete_multiple],
60
60
  'api/v2/compliance/arf_reports' => [:destroy]},
61
61
  :resource_type => 'ForemanOpenscap::ArfReport'
62
62
  permission :create_arf_reports, {'api/v2/compliance/arf_reports' => [:create]},
63
63
  :resource_type => 'ForemanOpenscap::ArfReport'
64
64
 
65
- permission :view_policies, {:policies => %i(index show parse auto_complete_search),
65
+ permission :view_policies, {:policies => %i[index show parse auto_complete_search],
66
66
  :policy_dashboard => [:index],
67
67
  :compliance_dashboard => [:index],
68
- 'api/v2/compliance/policies' => %i(index show content)},
68
+ 'api/v2/compliance/policies' => %i[index show content]},
69
69
  :resource_type => 'ForemanOpenscap::Policy'
70
- permission :edit_policies, {:policies => %i(edit update scap_content_selected),
70
+ permission :edit_policies, {:policies => %i[edit update scap_content_selected],
71
71
  'api/v2/compliance/policies' => [:update]},
72
72
  :resource_type => 'ForemanOpenscap::Policy'
73
- permission :create_policies, {:policies => %i(new create),
73
+ permission :create_policies, {:policies => %i[new create],
74
74
  'api/v2/compliance/policies' => [:create]},
75
75
  :resource_type => 'ForemanOpenscap::Policy'
76
76
  permission :destroy_policies, {:policies => [:destroy],
77
77
  'api/v2/compliance/policies' => [:destroy]},
78
78
  :resource_type => 'ForemanOpenscap::Policy'
79
- permission :assign_policies, {:policies => %i(select_multiple_hosts update_multiple_hosts
79
+ permission :assign_policies, {:policies => %i[select_multiple_hosts update_multiple_hosts
80
80
  disassociate_multiple_hosts
81
- remove_policy_from_multiple_hosts)},
81
+ remove_policy_from_multiple_hosts]},
82
82
  :resource_type => 'ForemanOpenscap::Policy'
83
- permission :view_scap_contents, {:scap_contents => %i(index show auto_complete_search),
84
- 'api/v2/compliance/scap_contents' => %i(index show xml)},
83
+ permission :view_scap_contents, {:scap_contents => %i[index show auto_complete_search],
84
+ 'api/v2/compliance/scap_contents' => %i[index show xml]},
85
85
  :resource_type => 'ForemanOpenscap::ScapContent'
86
- permission :edit_scap_contents, {:scap_contents => %i(edit update),
86
+ permission :edit_scap_contents, {:scap_contents => %i[edit update],
87
87
  'api/v2/compliance/scap_contents' => [:update]},
88
88
  :resource_type => 'ForemanOpenscap::ScapContent'
89
- permission :create_scap_contents, {:scap_contents => %i(new create),
89
+ permission :create_scap_contents, {:scap_contents => %i[new create],
90
90
  'api/v2/compliance/scap_contents' => [:create]},
91
91
  :resource_type => 'ForemanOpenscap::ScapContent'
92
92
  permission :destroy_scap_contents, {:scap_contents => [:destroy],
@@ -94,15 +94,15 @@ remove_policy_from_multiple_hosts)},
94
94
  :resource_type => 'ForemanOpenscap::ScapContent'
95
95
  permission :edit_hosts, { :hosts => [:openscap_proxy_changed] }, :resource_type => "Host"
96
96
  permission :edit_hostgroups, { :hostgroups => [:openscap_proxy_changed] }, :resource_type => "Hostgroup"
97
- permission :create_tailoring_files, { :tailoring_files => %i(create new),
97
+ permission :create_tailoring_files, { :tailoring_files => %i[create new],
98
98
  'api/v2/compliance/tailoring_files' => [:create]},
99
99
  :resource_type => 'ForemanOpenscap::TailoringFile'
100
- permission :view_tailoring_files, { :tailoring_files => %i(index auto_complete_search xml),
100
+ permission :view_tailoring_files, { :tailoring_files => %i[index auto_complete_search xml],
101
101
  :policies => [:tailoring_file_selected],
102
- 'api/v2/compliance/tailoring_files' => %i(show xml index),
102
+ 'api/v2/compliance/tailoring_files' => %i[show xml index],
103
103
  'api/v2/compliance/policies' => [:tailoring] },
104
104
  :resource_type => 'ForemanOpenscap::TailoringFile'
105
- permission :edit_tailoring_files, { :tailoring_files => %i(edit update),
105
+ permission :edit_tailoring_files, { :tailoring_files => %i[edit update],
106
106
  'api/v2/compliance/tailoring_files' => [:update] },
107
107
  :resource_type => 'ForemanOpenscap::TailoringFile'
108
108
  permission :destroy_tailoring_files, { :tailoring_files => [:destroy],
@@ -112,12 +112,12 @@ remove_policy_from_multiple_hosts)},
112
112
  :resource_type => 'SmartProxy'
113
113
  end
114
114
 
115
- role "Compliance viewer", %i(view_arf_reports view_policies view_scap_contents view_tailoring_files view_openscap_proxies)
116
- role "Compliance manager", %i(view_arf_reports view_policies view_scap_contents
115
+ role "Compliance viewer", %i[view_arf_reports view_policies view_scap_contents view_tailoring_files view_openscap_proxies]
116
+ role "Compliance manager", %i[view_arf_reports view_policies view_scap_contents
117
117
  destroy_arf_reports edit_policies edit_scap_contents assign_policies
118
118
  create_policies create_scap_contents destroy_policies destroy_scap_contents
119
119
  create_tailoring_files view_tailoring_files edit_tailoring_files destroy_tailoring_files
120
- view_openscap_proxies)
120
+ view_openscap_proxies]
121
121
  role "Create ARF report", [:create_arf_reports] # special as only Proxy can create
122
122
 
123
123
  add_all_permissions_to_default_roles
@@ -191,13 +191,12 @@ view_openscap_proxies)
191
191
  Host::Managed.send(:include, ForemanOpenscap::OpenscapProxyCoreExtensions)
192
192
  Host::Managed.send(:include, ForemanOpenscap::HostExtensions)
193
193
  HostsHelper.send(:include, ForemanOpenscap::HostsHelperExtensions)
194
- Hostgroup.send(:include, ForemanOpenscap::HostgroupExtensions)
195
194
  Hostgroup.send(:include, ForemanOpenscap::OpenscapProxyExtensions)
196
195
  Hostgroup.send(:include, ForemanOpenscap::OpenscapProxyCoreExtensions)
196
+ Hostgroup.send(:include, ForemanOpenscap::HostgroupExtensions)
197
197
  ForemanOpenscap::ArfReport.send(:include, ForemanOpenscap::ComplianceStatusScopedSearch)
198
198
  SmartProxy.send(:include, ForemanOpenscap::SmartProxyExtensions)
199
199
  HostsController.send(:include, ForemanOpenscap::HostsControllerExtensions)
200
- HostgroupsController.send(:include, ForemanOpenscap::HostgroupsControllerExtensions)
201
200
  Log.send(:include, ForemanOpenscap::LogExtensions)
202
201
  LookupKeysHelper.send(:include, ForemanOpenscap::LookupKeysHelperExtensions)
203
202
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanOpenscap
2
- VERSION = "0.7.2".freeze
2
+ VERSION = "0.7.3".freeze
3
3
  end
@@ -130,6 +130,9 @@ msgstr ""
130
130
  msgid "Create a Tailoring file"
131
131
  msgstr ""
132
132
 
133
+ msgid "Create policy"
134
+ msgstr ""
135
+
133
136
  msgid "Created"
134
137
  msgstr ""
135
138
 
@@ -199,6 +202,9 @@ msgstr ""
199
202
  msgid "Effective Profile"
200
203
  msgstr ""
201
204
 
205
+ msgid "Enable \"logs\" feature on proxy to search for errors"
206
+ msgstr ""
207
+
202
208
  msgid "Failed"
203
209
  msgstr ""
204
210
 
@@ -260,6 +266,9 @@ msgstr ""
260
266
  msgid "Host is deleted"
261
267
  msgstr ""
262
268
 
269
+ msgid "Hostgroups"
270
+ msgstr ""
271
+
263
272
  msgid "Hostname"
264
273
  msgstr ""
265
274
 
@@ -357,9 +366,6 @@ msgstr ""
357
366
  msgid "No OpenSCAP proxy found for %{class} with %{id}"
358
367
  msgstr ""
359
368
 
360
- msgid "No available proxy to validate SCAP data stream file"
361
- msgstr ""
362
-
363
369
  msgid "No available proxy to validate. Returned with error: %s"
364
370
  msgstr ""
365
371
 
@@ -378,7 +384,10 @@ msgstr ""
378
384
  msgid "No hosts were found."
379
385
  msgstr ""
380
386
 
381
- msgid "No proxy with OpenSCAP features"
387
+ msgid "No proxy with OpenSCAP feature is running."
388
+ msgstr ""
389
+
390
+ msgid "No proxy with OpenSCAP feature was found."
382
391
  msgstr ""
383
392
 
384
393
  msgid "No report for this policy"
@@ -130,6 +130,9 @@ msgstr ""
130
130
  msgid "Create a Tailoring file"
131
131
  msgstr ""
132
132
 
133
+ msgid "Create policy"
134
+ msgstr ""
135
+
133
136
  msgid "Created"
134
137
  msgstr ""
135
138
 
@@ -199,6 +202,9 @@ msgstr ""
199
202
  msgid "Effective Profile"
200
203
  msgstr ""
201
204
 
205
+ msgid "Enable \"logs\" feature on proxy to search for errors"
206
+ msgstr ""
207
+
202
208
  msgid "Failed"
203
209
  msgstr ""
204
210
 
@@ -260,6 +266,9 @@ msgstr ""
260
266
  msgid "Host is deleted"
261
267
  msgstr ""
262
268
 
269
+ msgid "Hostgroups"
270
+ msgstr ""
271
+
263
272
  msgid "Hostname"
264
273
  msgstr ""
265
274
 
@@ -357,9 +366,6 @@ msgstr ""
357
366
  msgid "No OpenSCAP proxy found for %{class} with %{id}"
358
367
  msgstr ""
359
368
 
360
- msgid "No available proxy to validate SCAP data stream file"
361
- msgstr ""
362
-
363
369
  msgid "No available proxy to validate. Returned with error: %s"
364
370
  msgstr ""
365
371
 
@@ -378,7 +384,10 @@ msgstr ""
378
384
  msgid "No hosts were found."
379
385
  msgstr ""
380
386
 
381
- msgid "No proxy with OpenSCAP features"
387
+ msgid "No proxy with OpenSCAP feature is running."
388
+ msgstr ""
389
+
390
+ msgid "No proxy with OpenSCAP feature was found."
382
391
  msgstr ""
383
392
 
384
393
  msgid "No report for this policy"
@@ -130,6 +130,9 @@ msgstr ""
130
130
  msgid "Create a Tailoring file"
131
131
  msgstr ""
132
132
 
133
+ msgid "Create policy"
134
+ msgstr ""
135
+
133
136
  msgid "Created"
134
137
  msgstr ""
135
138
 
@@ -199,6 +202,9 @@ msgstr ""
199
202
  msgid "Effective Profile"
200
203
  msgstr ""
201
204
 
205
+ msgid "Enable \"logs\" feature on proxy to search for errors"
206
+ msgstr ""
207
+
202
208
  msgid "Failed"
203
209
  msgstr ""
204
210
 
@@ -260,6 +266,9 @@ msgstr ""
260
266
  msgid "Host is deleted"
261
267
  msgstr ""
262
268
 
269
+ msgid "Hostgroups"
270
+ msgstr ""
271
+
263
272
  msgid "Hostname"
264
273
  msgstr ""
265
274
 
@@ -357,9 +366,6 @@ msgstr ""
357
366
  msgid "No OpenSCAP proxy found for %{class} with %{id}"
358
367
  msgstr ""
359
368
 
360
- msgid "No available proxy to validate SCAP data stream file"
361
- msgstr ""
362
-
363
369
  msgid "No available proxy to validate. Returned with error: %s"
364
370
  msgstr ""
365
371
 
@@ -378,7 +384,10 @@ msgstr ""
378
384
  msgid "No hosts were found."
379
385
  msgstr ""
380
386
 
381
- msgid "No proxy with OpenSCAP features"
387
+ msgid "No proxy with OpenSCAP feature is running."
388
+ msgstr ""
389
+
390
+ msgid "No proxy with OpenSCAP feature was found."
382
391
  msgstr ""
383
392
 
384
393
  msgid "No report for this policy"