summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-07-01 22:26:14 -0700
committerStan Hu <stanhu@gmail.com>2015-07-02 04:22:51 -0700
commit3e738e3b9aeae5620116109258c4d4da84180e7e (patch)
treed433a56409141671d9c56e6bca3e0ce16f546ce5 /app/controllers
parent2ca7ffd094ae285823d1a00b8cf1a7d23b80a2a3 (diff)
downloadgitlab-ce-3e738e3b9aeae5620116109258c4d4da84180e7e.tar.gz
Add support for unlocking users in admin settings
Closes https://github.com/gitlabhq/gitlabhq/issues/9381
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/users_controller.rb8
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,