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:
authorStan Hu <stanhu@gmail.com>2015-07-02 08:26:14 +0300
committerStan Hu <stanhu@gmail.com>2015-07-02 14:22:51 +0300
commit3e738e3b9aeae5620116109258c4d4da84180e7e (patch)
treed433a56409141671d9c56e6bca3e0ce16f546ce5 /app/controllers/admin/users_controller.rb
parent2ca7ffd094ae285823d1a00b8cf1a7d23b80a2a3 (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.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,