diff options
author | Stan Hu <stanhu@gmail.com> | 2015-07-01 22:26:14 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-07-02 04:22:51 -0700 |
commit | 3e738e3b9aeae5620116109258c4d4da84180e7e (patch) | |
tree | d433a56409141671d9c56e6bca3e0ce16f546ce5 /app/views/admin/users | |
parent | 2ca7ffd094ae285823d1a00b8cf1a7d23b80a2a3 (diff) | |
download | gitlab-ce-3e738e3b9aeae5620116109258c4d4da84180e7e.tar.gz |
Add support for unlocking users in admin settings
Closes https://github.com/gitlabhq/gitlabhq/issues/9381
Diffstat (limited to 'app/views/admin/users')
-rw-r--r-- | app/views/admin/users/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/users/show.html.haml | 8 |
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 |