diff options
author | Stan Hu <stanhu@gmail.com> | 2015-07-02 08:26:14 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-07-02 14:22:51 +0300 |
commit | 3e738e3b9aeae5620116109258c4d4da84180e7e (patch) | |
tree | d433a56409141671d9c56e6bca3e0ce16f546ce5 /app/controllers/admin/users_controller.rb | |
parent | 2ca7ffd094ae285823d1a00b8cf1a7d23b80a2a3 (diff) |
Add support for unlocking users in admin settings
Closes https://github.com/gitlabhq/gitlabhq/issues/9381
Diffstat (limited to 'app/controllers/admin/users_controller.rb')
-rw-r--r-- | app/controllers/admin/users_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index ec29c320654..7a683098df3 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -47,6 +47,14 @@ class Admin::UsersController < Admin::ApplicationController end end + def unlock + if user.unlock_access! + redirect_to :back, alert: "Successfully unlocked" + else + redirect_to :back, alert: "Error occurred. User was not unlocked" + end + end + def create opts = { force_random_password: true, |