Sha256: 712c4f0a99686a85c237ff90c189391bc9a09b70cae1f825e814a9f57661c1b6

Contents?: true

Size: 669 Bytes

Versions: 15

Compression:

Stored size: 669 Bytes

Contents

class CreateAdminUserAndUserGroup < ActiveRecord::Migration
  def self.up
		#
		# Creating an administrators user group database record
    # to allow for the creation of other administrators
		#
		Lockdown::System.create_administrator_user_group

		# TODO: Change the password
    u = User.new(	:password => "password", 
									:password_confirmation => "password", 
									:login => "admin")

    u.profile = Profile.create(:first_name => "Administrator",
																:last_name => "User",
																:email => "administrator@a.com")
    u.save

		Lockdown::System.make_user_administrator(u)
  end
	 
  def self.down
    #Nothing to see here...
	end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
lockdown-0.3.12 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.13 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.14 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.11 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.10 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.1 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.6 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.7 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.8 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.9 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.3 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.15 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.2 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.4 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.3.5 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb