Sha256: a380a3eda46fcd2912dcd5acf184f4dffe778494f30ec88bfa83fd957caa75cb

Contents?: true

Size: 495 Bytes

Versions: 16

Compression:

Stored size: 495 Bytes

Contents

class CreateAdminUserAndUserGroup < ActiveRecord::Migration
  def self.up
		# 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

16 entries across 15 versions & 1 rubygems

Version Path
lockdown-0.4.4 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.4.0 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.4.1 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.4.2 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.4.3 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.4.5 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.4.6 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.5.0 rails_generators/lockdown/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.5.0 rails_generators/lockdown_all/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.5.1 rails_generators/lockdown/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.5.2 rails_generators/lockdown/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.5.3 rails_generators/lockdown/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.5.4 rails_generators/lockdown/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.5.5 rails_generators/lockdown/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.5.6 rails_generators/lockdown/templates/db/migrate/create_admin_user_and_user_group.rb
lockdown-0.5.7 rails_generators/lockdown/templates/db/migrate/create_admin_user_and_user_group.rb