foreman_bootdisk 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8a87816866ed51776fc4c8ac41dda8c95ba54af3
4
+ data.tar.gz: 109d8a3cda12ef381176764b44995695c5bd4497
5
+ SHA512:
6
+ metadata.gz: f1a26019f843ce8b8aa63ecfd5ffe4903924838e992c6e1f18e802412e7a1cf0ced908b6aa5620ce82018b399eadf93874d6251a89cbd2f230e2d02bceeea42e
7
+ data.tar.gz: 614523701c49a45f4c6bad05aa10ee699a97aed34cb35e105282c5082e354cd5a070d05d72787c936adeb9b9451076c43b3a4209aa9a9eb235d8fd721216b0ee
data/CHANGES.md CHANGED
@@ -1,10 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.2.1
4
+ * add permission and default role for non-admin users
5
+ * fix DB migration from clean install
6
+
3
7
  ## v1.2.0
4
8
  * add generic image, relying on DHCP and a MAC/IP search
5
9
  * fix inability to associate provided templates with OSes
6
10
 
7
- # v1.1.0
11
+ ## v1.1.0
8
12
  * per-host USB image support using isohybrid
9
13
  * templates updated for multi-NIC support
10
14
  * Ruby 1.8.7 fixes
data/README.md CHANGED
@@ -45,6 +45,9 @@ For per-host images, ensure host IP addresses and subnets are populated, and
45
45
  the subnet's gateway, subnet mask and DNS resolver(s) are correctly configured
46
46
  under More>Provisioning>Subnets in Foreman.
47
47
 
48
+ To permit access to images for non-admin users, add the "Boot disk access" role
49
+ to a user or the "download_bootdisk" permission to an existing role.
50
+
48
51
  ### Templates
49
52
 
50
53
  The templates used on the boot disks themselves are read-only so they can be
@@ -0,0 +1,16 @@
1
+ # Add permissions
2
+ Foreman::AccessControl.map do |map|
3
+ map.security_block :bootdisk do |map|
4
+ map.permission :download_bootdisk, {:hosts => [:bootdisk_iso],
5
+ :'bootdisk/disks' => [:generic_iso, :index]}
6
+ end
7
+ end
8
+
9
+ begin
10
+ # Add a new role called 'Boot disk access' if it doesn't exist
11
+ Role.transaction do
12
+ role = Role.find_or_create_by_name("Boot disk access")
13
+ role.update_attribute :permissions, [:download_bootdisk] if role.permissions.empty?
14
+ end
15
+ rescue
16
+ end
@@ -17,11 +17,15 @@ module Bootdisk
17
17
  end
18
18
 
19
19
  config.to_prepare do
20
- ConfigTemplate.send(:include, Bootdisk::ConfigTemplateExt)
21
- Host::Managed.send(:include, Bootdisk::HostExt)
22
- HostsController.send(:include, Bootdisk::HostsControllerExt)
23
- HostsHelper.send(:include, Bootdisk::HostsHelperExt)
24
- UnattendedController.send(:include, Bootdisk::UnattendedControllerExt)
20
+ begin
21
+ ConfigTemplate.send(:include, Bootdisk::ConfigTemplateExt)
22
+ Host::Managed.send(:include, Bootdisk::HostExt)
23
+ HostsController.send(:include, Bootdisk::HostsControllerExt)
24
+ HostsHelper.send(:include, Bootdisk::HostsHelperExt)
25
+ UnattendedController.send(:include, Bootdisk::UnattendedControllerExt)
26
+ rescue => e
27
+ puts "#{Bootdisk::ENGINE_NAME}: skipping engine hook (#{e.to_s})"
28
+ end
25
29
  end
26
30
  end
27
31
  end
@@ -1,3 +1,3 @@
1
1
  module Bootdisk
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
metadata CHANGED
@@ -1,34 +1,25 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: foreman_bootdisk
3
- version: !ruby/object:Gem::Version
4
- hash: 31
5
- prerelease:
6
- segments:
7
- - 1
8
- - 2
9
- - 0
10
- version: 1.2.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.1
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Dominic Cleal
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2013-09-17 00:00:00 Z
11
+ date: 2013-09-24 00:00:00.000000000 Z
19
12
  dependencies: []
20
-
21
- description: Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure.
13
+ description: Plugin for Foreman that creates iPXE-based boot disks to provision hosts
14
+ without the need for PXE infrastructure.
22
15
  email: dcleal@redhat.com
23
16
  executables: []
24
-
25
17
  extensions: []
26
-
27
- extra_rdoc_files:
18
+ extra_rdoc_files:
28
19
  - CHANGES.md
29
20
  - LICENSE
30
21
  - README.md
31
- files:
22
+ files:
32
23
  - CHANGES.md
33
24
  - LICENSE
34
25
  - README.md
@@ -45,6 +36,7 @@ files:
45
36
  - app/views/bootdisk/host_v1.erb
46
37
  - app/views/bootdisk/host_v2.erb
47
38
  - app/views/bootdisk/kickstart_v1.erb
39
+ - config/initializers/bootdisk_permissions.rb
48
40
  - config/routes.rb
49
41
  - db/migrate/20130914211030_create_host_bootdisk_template.rb
50
42
  - db/migrate/20130915104500_edit_host_bootdisk_template_multinic.rb
@@ -55,37 +47,27 @@ files:
55
47
  - lib/foreman_bootdisk.rb
56
48
  - lib/tasks/bootdisk.rake
57
49
  homepage: http://github.com/theforeman/foreman_bootdisk
58
- licenses:
50
+ licenses:
59
51
  - GPL-3
52
+ metadata: {}
60
53
  post_install_message:
61
54
  rdoc_options: []
62
-
63
- require_paths:
55
+ require_paths:
64
56
  - lib
65
- required_ruby_version: !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
74
- required_rubygems_version: !ruby/object:Gem::Requirement
75
- none: false
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- hash: 3
80
- segments:
81
- - 0
82
- version: "0"
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
83
67
  requirements: []
84
-
85
68
  rubyforge_project:
86
- rubygems_version: 1.8.25
69
+ rubygems_version: 2.0.6
87
70
  signing_key:
88
- specification_version: 3
71
+ specification_version: 4
89
72
  summary: Create boot disks to provision hosts with Foreman
90
73
  test_files: []
91
-