Sha256: 9bbfc69d550144541317bcecccad447e710055aa5594ad1868d792cbc27a2f63

Contents?: true

Size: 361 Bytes

Versions: 3

Compression:

Stored size: 361 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

3 entries across 3 versions & 1 rubygems

Version Path
foreman_openscap-0.8.6 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-0.8.5 db/migrate/20161223153249_add_permissions_to_arf_report.rb
foreman_openscap-0.8.4 db/migrate/20161223153249_add_permissions_to_arf_report.rb