Sha256: 96fd2d85aa46fe419fece73984e019f75c61311aa93b2179810d2b6d0971fb57

Contents?: true

Size: 345 Bytes

Versions: 6

Compression:

Stored size: 345 Bytes

Contents

class AddPermissionsToArfReport < ActiveRecord::Migration
  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

6 entries across 6 versions & 1 rubygems

Version Path
foreman_openscap-0.7.1 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-0.6.7 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-0.7.0 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-0.6.6 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-0.6.5 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-0.6.4 db/migrate/20161223153249_add_permissions_to_arf_report.rb