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