Sha256: f775b3484b6203dfe64bc6b2442d42899feacb697bf20ef83a7e3872054d07b7

Contents?: true

Size: 366 Bytes

Versions: 73

Compression:

Stored size: 366 Bytes

Contents

class AddPermissionsToArfReport < ActiveRecord::Migration[4.2]
  def up
    Permission.where(:name => %w[view_arf_reports destroy_arf_reports])
              .update_all(:resource_type => 'ForemanOpenscap::ArfReport')
  end

  def down
    Permission.where(:name => %w[view_arf_reports destroy_arf_reports])
              .update_all(:resource_type => '')
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
foreman_openscap-10.1.0 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-10.0.3 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-10.0.2 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-10.0.1 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-10.0.0 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-9.0.4 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-9.0.3 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-9.0.2 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-9.0.1 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-9.0.0 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-8.0.0 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-7.1.1 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-7.1.0 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-7.0.0 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-6.0.0 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-5.2.3 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-5.2.2 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-5.1.1 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-5.2.1 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-5.2.0 db/migrate/20161223153249_add_permissions_to_arf_report.rb