Sha256: 94fb832944916e851fc7dd69d7dd4cf4b9929114e766f43d989572bdfaf54794

Contents?: true

Size: 414 Bytes

Versions: 11

Compression:

Stored size: 414 Bytes

Contents

# Create feature for Smart Proxy
Feature.where(:name => 'Salt').first_or_create

# Add new viewing permissions to Viewer role
viewer = Role.find_by_name('Viewer')

if viewer
  Permission.where(:name => [:view_smart_proxies_salt_keys, :view_smart_proxies_salt_autosign, :view_salt_modules]).each do |permission|
    viewer.add_permissions!([permission.name]) unless viewer.permissions.include? permission
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
foreman_salt-8.0.2 db/seeds.d/75-salt_seeds.rb
foreman_salt-8.0.1 db/seeds.d/75-salt_seeds.rb
foreman_salt-7.0.3 db/seeds.d/75-salt_seeds.rb
foreman_salt-8.0.0 db/seeds.d/75-salt_seeds.rb
foreman_salt-7.0.2 db/seeds.d/75-salt_seeds.rb
foreman_salt-6.0.1 db/seeds.d/75-salt_seeds.rb
foreman_salt-7.0.1 db/seeds.d/75-salt_seeds.rb
foreman_salt-7.0.0 db/seeds.d/75-salt_seeds.rb
foreman_salt-6.0.0 db/seeds.d/75-salt_seeds.rb
foreman_salt-5.0.1 db/seeds.d/75-salt_seeds.rb
foreman_salt-5.0.0 db/seeds.d/75-salt_seeds.rb