Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-05-03 14:42:55 +0300
committerSean McGivern <sean@gitlab.com>2016-05-16 11:21:24 +0300
commitbec350528cdc81e26476780f1ca3db8171b3ece8 (patch)
tree31e273cd2202ad4e2647d127d464dd1c31b52ded /app/controllers/admin/users_controller.rb
parent78a67fc48dab434b43a080e5b15491963656661a (diff)
Force password change after admin reset
When an admin changes a user's password for them, force the user to reset the password after logging in by expiring the new password immediately.
Diffstat (limited to 'app/controllers/admin/users_controller.rb')
-rw-r--r--app/controllers/admin/users_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index f2f654c7bcd..6908a3bf946 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -119,6 +119,7 @@ class Admin::UsersController < Admin::ApplicationController
user_params_with_pass.merge!(
password: params[:user][:password],
password_confirmation: params[:user][:password_confirmation],
+ password_expires_at: Time.now
)
end