diff --git a/db/fixtures/development/02_users.rb b/db/fixtures/development/02_users.rb index 909d10cbb40ae7fd8574a929e207782c66354b7f..7916cdd5fb15711597b11efa9860e310a0a2f4d0 100644 --- a/db/fixtures/development/02_users.rb +++ b/db/fixtures/development/02_users.rb @@ -22,7 +22,7 @@ def seed! private def create_mass_users! - encrypted_password = Devise::Encryptor.digest(User, '12345678') + encrypted_password = Devise::Encryptor.digest(User, random_password) Gitlab::Seeder.with_mass_insert(MASS_USERS_COUNT, User) do ActiveRecord::Base.connection.execute <<~SQL @@ -49,6 +49,10 @@ def create_mass_users! FROM users WHERE NOT admin SQL end + + puts '===========================================================' + puts "INFO: Password for newly created users is: #{random_password}" + puts '===========================================================' end def create_random_users! @@ -59,7 +63,7 @@ def create_random_users! name: FFaker::Name.name, email: FFaker::Internet.email, confirmed_at: DateTime.now, - password: '12345678' + password: random_password ) print '.' @@ -68,6 +72,10 @@ def create_random_users! end end end + + def random_password + @random_password ||= SecureRandom.hex.slice(0,16) + end end Gitlab::Seeder.quiet do