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:
authorGabriel Mazetto <gabriel@gitlab.com>2015-12-29 23:58:38 +0300
committerGabriel Mazetto <gabriel@gitlab.com>2016-01-08 21:26:04 +0300
commitba9855d4877998e3574907cc542fcab15a9d1353 (patch)
tree45c3a2eb45fd227d95b5d1c5177becccbde26bf1 /app/controllers
parentbc7ef8e5b7a002ca6bc2d7a5e6be11b4a59b6710 (diff)
Prevent ldap_blocked users from being unblocked by the Admin UI
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/users_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index d7c927d444c..87f4fb455b8 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -40,7 +40,9 @@ class Admin::UsersController < Admin::ApplicationController
end
def unblock
- if user.activate
+ if user.ldap_blocked?
+ redirect_back_or_admin_user(alert: "This user cannot be unlocked manually from GitLab")
+ elsif user.activate
redirect_back_or_admin_user(notice: "Successfully unblocked")
else
redirect_back_or_admin_user(alert: "Error occurred. User was not unblocked")