1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-10-17 17:01:01 +00:00

Force password reset for default admin user (#22381).

Patch by Gregor Schmidt.

git-svn-id: http://svn.redmine.org/redmine/trunk@15321 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2016-04-11 19:07:36 +00:00
parent 97a647c1e5
commit 1013e77e16

View File

@ -0,0 +1,9 @@
class ForcePasswordResetDuringSetup < ActiveRecord::Migration
def up
User.where(login: "admin", last_login_on: nil).update_all(must_change_passwd: true)
end
def down
User.where(login: "admin", last_login_on: nil, must_change_passwd: true).update_all(must_change_passwd: false)
end
end