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.7.3 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.7.2 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.7.1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.6.2.1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.6.2 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.7.0 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.6.1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.7.0.rc2 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.7.0.rc1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.4.2.2 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.4.2.1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.4.2 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.5.1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.6.0 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.6.0.rc2 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.6.0.rc1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.5.0 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.5.0.rc2 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.4.1 db/migrate/20161021072346_fix_subscription_permissions.rb
katello-4.5.0.rc1 db/migrate/20161021072346_fix_subscription_permissions.rb