diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2014-11-07 15:24:54 +0100 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2014-11-07 15:24:54 +0100 |
commit | 2bb8e93d80de6b09caa6a1d9305acc468f0e3d4b (patch) | |
tree | 7bab9584d5db220681472fa0b053f64936e2fa65 | |
parent | 9a2afa00743fbdec89aa77f45659e82956d14e6f (diff) | |
parent | 019c0f9e0f0f8b74803be57cb9f8ef8ab2e057ef (diff) | |
download | gitlab-ce-2bb8e93d80de6b09caa6a1d9305acc468f0e3d4b.tar.gz |
Merge pull request #8246 from dluchinienoc/master
Do not require immediate password reset if specifying a password
-rw-r--r-- | db/fixtures/production/001_admin.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/db/fixtures/production/001_admin.rb b/db/fixtures/production/001_admin.rb index e0b13db020d..0755ac714e1 100644 --- a/db/fixtures/production/001_admin.rb +++ b/db/fixtures/production/001_admin.rb @@ -1,8 +1,10 @@ -password = if ENV['GITLAB_ROOT_PASSWORD'].blank? - "5iveL!fe" - else - ENV['GITLAB_ROOT_PASSWORD'] - end +if ENV['GITLAB_ROOT_PASSWORD'].blank? + password = '5iveL!fe' + expire_time = Time.now +else + password = ENV['GITLAB_ROOT_PASSWORD'] + expire_time = nil +end admin = User.create( email: "admin@example.com", @@ -10,7 +12,7 @@ admin = User.create( username: 'root', password: password, password_confirmation: password, - password_expires_at: Time.now, + password_expires_at: expire_time, theme_id: Gitlab::Theme::MARS ) |