Sha256: 9cf06983fd575c18150d848aa887d4a007910e09be879bf9493a22eaf7fad750

Contents?: true

Size: 625 Bytes

Versions: 195

Compression:

Stored size: 625 Bytes

Contents

class FixSubscriptionPermissions < ActiveRecord::Migration[4.2]
  def up
    permission_names = [:view_subscriptions, :attach_subscriptions, :unattach_subscriptions, :import_manifest, :delete_manifest]
    Permission.where(:resource_type => 'Organization', :name => permission_names).update_all(resource_type: 'Katello::Subscription')
  end

  def down
    permission_names = [:view_subscriptions, :attach_subscriptions, :unattach_subscriptions, :import_manifest, :delete_manifest]
    Permission.where(:resource_type => 'Katello::Subscription', :name => permission_names).update_all(resource_type: 'Organization')
  end
end

Version data entries

195 entries across 195 versions & 1 rubygems

Version Path
katello-4.4.0.2 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.4.0.1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.3.1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.4.0 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.4.0.rc2 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.4.0.rc1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.2.2 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.3.0 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.3.0.rc4 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.3.0.rc3 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.3.0.rc2.1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.3.0.rc2 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.3.0.rc1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.2.1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.2.0.1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.1.4 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.0.3 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.2.0.1.rc3 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-3.18.5 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.2.0.1.rc2 db/migrate/20161021072346_fix_subscription_permissions.rb