summaryrefslogtreecommitdiff
path: root/app/views/admin/users
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin/users')
-rw-r--r--app/views/admin/users/index.html.haml2
-rw-r--r--app/views/admin/users/show.html.haml8
2 files changed, 10 insertions, 0 deletions
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
index 9c1bec7c84d..b0d31170704 100644
--- a/app/views/admin/users/index.html.haml
+++ b/app/views/admin/users/index.html.haml
@@ -93,6 +93,8 @@
= 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"
+ - if user.access_locked?
+ = link_to 'Unlock', unlock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success", data: { confirm: 'Are you sure?' }
- if user.can_be_removed?
= link_to 'Destroy', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All tickets linked to this user will also be removed! Maybe block the user instead? Are you sure?" }, method: :delete, class: "btn btn-xs btn-remove"
= paginate @users, theme: "gitlab"
diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml
index 2662b3569ec..8c6b8e851c4 100644
--- a/app/views/admin/users/show.html.haml
+++ b/app/views/admin/users/show.html.haml
@@ -131,6 +131,14 @@
%li Owned groups will be left
%br
= link_to 'Block user', block_admin_user_path(@user), data: { confirm: 'USER WILL BE BLOCKED! Are you sure?' }, method: :put, class: "btn btn-warning"
+ - if @user.access_locked?
+ .panel.panel-info
+ .panel-heading
+ This account has been locked
+ .panel-body
+ %p This user has been temporarily locked due to excessive number of failed logins. You may manually unlock the account.
+ %br
+ = link_to 'Unlock user', unlock_admin_user_path(@user), method: :put, class: "btn btn-info", data: { confirm: 'Are you sure?' }
.panel.panel-danger
.panel-heading