foreman_virt_who_configure 0.2.2 → 0.3.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c9d0b1bd39ef64d89b9dd99354534d18867afe7
|
4
|
+
data.tar.gz: 647f150db1e6c1f20274bf5b01beb37aad6f860f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8673a8cb1b35ae0d1b92bf4ba934bfd3cf7acad6330aebd59a71fdcaffdfc8c69f139a61394e51bb72bf20d2ca21736f8a8364927e3e70f8b3130168c97b973b
|
7
|
+
data.tar.gz: 55cc16da7f0daf66d69b17e9b565936d91c029c470508ef72e1b288213cd040e6b32b32f119504b9db4f764d526a90c6aef4778da90c834a194b5177d534525d
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module VirtWhoTaxonomyExtensions
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
included do
|
4
|
+
# the order is imporant here, around filter needs to disable audit creation, otherwise config deletion
|
5
|
+
# creates audit during org deletion and creates foreign key issue, the relation must be defined later
|
6
|
+
around_destroy :ignore_auditing_of_config
|
7
|
+
has_many :configs, :dependent => :destroy, :class_name => 'ForemanVirtWhoConfigure::Config'
|
8
|
+
|
9
|
+
def ignore_auditing_of_config
|
10
|
+
::ForemanVirtWhoConfigure::Config.without_auditing { yield }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -200,13 +200,13 @@ module ForemanVirtWhoConfigure
|
|
200
200
|
end
|
201
201
|
|
202
202
|
def virt_who_config_command
|
203
|
-
"hammer virt-who-config deploy --id #{self.id}"
|
203
|
+
"hammer virt-who-config deploy --id #{self.id} --organization-id #{self.organization_id}"
|
204
204
|
end
|
205
205
|
|
206
206
|
def virt_who_touch!
|
207
207
|
self.last_report_at = DateTime.now.utc
|
208
208
|
self.out_of_date_at = self.last_report_at + self.interval.minutes
|
209
|
-
self.save!
|
209
|
+
self.class.skip_permission_check { self.save! }
|
210
210
|
end
|
211
211
|
|
212
212
|
def status
|
@@ -27,7 +27,7 @@ module ForemanVirtWhoConfigure
|
|
27
27
|
|
28
28
|
initializer 'foreman_virt_who_configure.register_plugin', :before => :finisher_hook do |_app|
|
29
29
|
Foreman::Plugin.register :foreman_virt_who_configure do
|
30
|
-
requires_foreman '>= 1.
|
30
|
+
requires_foreman '>= 1.20'
|
31
31
|
|
32
32
|
apipie_documented_controllers ["#{ForemanVirtWhoConfigure::Engine.root}/app/controllers/foreman_virt_who_configure/api/v2/*.rb"]
|
33
33
|
|
@@ -55,13 +55,14 @@ module ForemanVirtWhoConfigure
|
|
55
55
|
end
|
56
56
|
|
57
57
|
begin
|
58
|
-
role 'Virt-who Reporter', reporter_permissions
|
58
|
+
role 'Virt-who Reporter', reporter_permissions, 'Role granting minimal set of permissions for virt-who to upload the report, it can be used if you configure virt-who manually and want to use user that has locked down account.'
|
59
59
|
rescue ArgumentError
|
60
60
|
# could not configure role, some permissions are missing
|
61
61
|
end
|
62
62
|
|
63
|
-
role 'Virt-who Manager',
|
64
|
-
|
63
|
+
role 'Virt-who Manager', [ :view_virt_who_config, :create_virt_who_config, :edit_virt_who_config, :destroy_virt_who_config ], 'Role granting all permissions to manage virt-who configurations, user needs this role to create, delete or update configurations.'
|
64
|
+
|
65
|
+
role 'Virt-who Viewer', [ :view_virt_who_config ], 'Role granting permissions to see all configurations including their configuration scripts, which means viewers could still deploy the virt-who instances for existing virt-who configurations.'
|
65
66
|
|
66
67
|
# Available since Foreman 1.15
|
67
68
|
add_all_permissions_to_default_roles if respond_to?(:add_all_permissions_to_default_roles)
|
@@ -101,6 +102,7 @@ module ForemanVirtWhoConfigure
|
|
101
102
|
# Include concerns in this config.to_prepare block
|
102
103
|
config.to_prepare do
|
103
104
|
SSO::METHODS.unshift SSO::BasicWithHidden
|
105
|
+
::Organization.send :include, VirtWhoTaxonomyExtensions
|
104
106
|
end
|
105
107
|
|
106
108
|
rake_tasks do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_virt_who_configure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman virt-who-configure team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: katello
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- app/helpers/foreman_virt_who_configure/compatibility_helper.rb
|
73
73
|
- app/helpers/foreman_virt_who_configure/configs_helper.rb
|
74
74
|
- app/lib/actions/foreman_virt_who_configure/config/report.rb
|
75
|
+
- app/models/concerns/virt_who_taxonomy_extensions.rb
|
75
76
|
- app/models/foreman_virt_who_configure/auth_source_hidden_with_authentication.rb
|
76
77
|
- app/models/foreman_virt_who_configure/config.rb
|
77
78
|
- app/models/foreman_virt_who_configure/output_generator.rb
|