Sha256: e8de53a48d0b89e22b846c677fcbcc3c01827ce5301e1759cb974fa30285d65f

Contents?: true

Size: 678 Bytes

Versions: 40

Compression:

Stored size: 678 Bytes

Contents

# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# !!! PLEASE KEEP THIS SCRIPT IDEMPOTENT !!!
#

unless Rails.env.test?
  ::Katello::OrganizationCreator.seed_all_organizations!
end

if ENV['SEED_ORGANIZATION']
  if Setting['db_pending_seed']
    admin = User.where(:login => ENV['SEED_ADMIN_USER'].present? ? ENV['SEED_ADMIN_USER'] : 'admin').first
    if admin && admin.default_organization.nil?
      admin.default_organization = Organization.find_by(:name => ENV['SEED_ORGANIZATION'])
      admin.save!
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
katello-4.4.2.2 db/seeds.d/102-organizations.rb
katello-4.4.2.1 db/seeds.d/102-organizations.rb
katello-4.4.2 db/seeds.d/102-organizations.rb
katello-4.6.0 db/seeds.d/102-organizations.rb
katello-4.6.0.rc2 db/seeds.d/102-organizations.rb
katello-4.6.0.rc1 db/seeds.d/102-organizations.rb
katello-4.5.0 db/seeds.d/102-organizations.rb
katello-4.5.0.rc2 db/seeds.d/102-organizations.rb
katello-4.4.1 db/seeds.d/102-organizations.rb
katello-4.5.0.rc1 db/seeds.d/102-organizations.rb
katello-4.4.0.2 db/seeds.d/102-organizations.rb
katello-4.4.0.1 db/seeds.d/102-organizations.rb
katello-4.3.1 db/seeds.d/102-organizations.rb
katello-4.4.0 db/seeds.d/102-organizations.rb
katello-4.4.0.rc2 db/seeds.d/102-organizations.rb
katello-4.4.0.rc1 db/seeds.d/102-organizations.rb
katello-4.2.2 db/seeds.d/102-organizations.rb
katello-4.3.0 db/seeds.d/102-organizations.rb
katello-4.3.0.rc4 db/seeds.d/102-organizations.rb
katello-4.3.0.rc3 db/seeds.d/102-organizations.rb