diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2015-12-29 18:58:38 -0200 |
---|---|---|
committer | Gabriel Mazetto <gabriel@gitlab.com> | 2016-01-08 16:26:04 -0200 |
commit | ba9855d4877998e3574907cc542fcab15a9d1353 (patch) | |
tree | 45c3a2eb45fd227d95b5d1c5177becccbde26bf1 /app/views/admin/users | |
parent | bc7ef8e5b7a002ca6bc2d7a5e6be11b4a59b6710 (diff) | |
download | gitlab-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.haml | 7 |
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 @@ = 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" |