summaryrefslogtreecommitdiff
path: root/app/views/admin/users
diff options
context:
space:
mode:
authorGabriel Mazetto <gabriel@gitlab.com>2015-12-29 18:58:38 -0200
committerGabriel Mazetto <gabriel@gitlab.com>2016-01-08 16:26:04 -0200
commitba9855d4877998e3574907cc542fcab15a9d1353 (patch)
tree45c3a2eb45fd227d95b5d1c5177becccbde26bf1 /app/views/admin/users
parentbc7ef8e5b7a002ca6bc2d7a5e6be11b4a59b6710 (diff)
downloadgitlab-ce-ba9855d4877998e3574907cc542fcab15a9d1353.tar.gz
Prevent ldap_blocked users from being unblocked by the Admin UI
Diffstat (limited to 'app/views/admin/users')
-rw-r--r--app/views/admin/users/index.html.haml7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
index a92c9c152b9..911c4d0cf12 100644
--- a/app/views/admin/users/index.html.haml
+++ b/app/views/admin/users/index.html.haml
@@ -90,7 +90,12 @@
&nbsp;
= link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-xs"
- unless user == current_user
- - if user.blocked?
+ - if user.ldap_blocked?
+ = link_to '#', title: 'Cannot unblock LDAP blocked users', data: {toggle: 'tooltip'}, class: 'btn btn-xs btn-success disabled' do
+ %i.fa.fa-lock
+ Unblock
+ = ''
+ - elsif user.blocked?
= link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success"
- else
= link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs btn-warning"