create admin user at first start of server

This commit is contained in:
Vokhmin Alexey V 2013-03-29 16:30:22 +04:00
parent 76e19f717c
commit 574396e03c
1 changed files with 4 additions and 1 deletions

View File

@ -7,4 +7,7 @@ end
%w(rosa_system iso_worker_1 file_store).each do |uname|
user = User.new uname: uname, email: "#{uname}@rosalinux.ru", password: SecureRandom.base64
user.confirmed_at, user.role = Time.now.utc, 'system'; user.save
end
end
admin = User.new uname: 'admin', email: 'admin@rosalinux.ru', password: 'qwerty'
admin.confirmed_at, admin.role = Time.now.utc, 'admin'; admin.save