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:
Diffstat (limited to 'app/controllers/admin/users_controller.rb')
-rw-r--r--app/controllers/admin/users_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 3c96e49499f..b75ca2649c3 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -159,7 +159,7 @@ class Admin::UsersController < Admin::ApplicationController
end
def unlock
- if update_user(&:unlock_access!)
+ if unlock_user
redirect_back_or_admin_user(notice: _("Successfully unlocked"))
else
redirect_back_or_admin_user(alert: _("Error occurred. User was not unlocked"))
@@ -401,6 +401,11 @@ class Admin::UsersController < Admin::ApplicationController
_("You cannot impersonate a user who cannot log in")
end
end
+
+ # method overriden in EE
+ def unlock_user
+ update_user(&:unlock_access!)
+ end
end
Admin::UsersController.prepend_mod_with('Admin::UsersController')