gitlab-org--gitlab-foss/db/fixtures/production/001_admin.rb

32 lines
547 B
Ruby
Raw Normal View History

if ENV['GITLAB_ROOT_PASSWORD'].blank?
password = '5iveL!fe'
expire_time = Time.now
else
password = ENV['GITLAB_ROOT_PASSWORD']
expire_time = nil
end
2011-10-08 17:36:38 -04:00
admin = User.create(
email: "admin@example.com",
name: "Administrator",
username: 'root',
password: password,
password_expires_at: expire_time,
theme_id: Gitlab::Themes::APPLICATION_DEFAULT
2013-08-26 06:06:41 -04:00
2011-10-08 17:36:38 -04:00
)
2011-10-09 14:15:01 -04:00
admin.projects_limit = 10000
2011-10-08 17:36:38 -04:00
admin.admin = true
admin.save!
admin.confirm
2011-10-21 13:58:04 -04:00
if admin.valid?
puts %Q[
2011-10-21 13:58:04 -04:00
Administrator account created:
login.........root
password......#{password}
2011-10-21 13:58:04 -04:00
]
end