diff options
author | Nick Thomas <nick@gitlab.com> | 2017-06-02 13:36:36 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-06-05 17:48:57 +0100 |
commit | 8ce26b3ab64caefce2f7bfba1448428657c0fecc (patch) | |
tree | 78218f116b1310830a091530f24ac821565afb88 /app/views/admin | |
parent | f09b7f56077f8b1deb88dd565717e8ed0d8e6aee (diff) | |
download | gitlab-ce-8ce26b3ab64caefce2f7bfba1448428657c0fecc.tar.gz |
Allow users to be hard-removed from the admin users list page
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/users/_user.html.haml | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/views/admin/users/_user.html.haml b/app/views/admin/users/_user.html.haml index 46d2e3b3de1..4cf4a57ba18 100644 --- a/app/views/admin/users/_user.html.haml +++ b/app/views/admin/users/_user.html.haml @@ -34,9 +34,15 @@ - if user.access_locked? %li = link_to 'Unlock', unlock_admin_user_path(user), method: :put, class: 'btn-grouped btn btn-xs btn-success', data: { confirm: 'Are you sure?' } - - if user.can_be_removed? && can?(current_user, :destroy_user, user) + - if can?(current_user, :destroy_user, user) %li.divider + - if user.can_be_removed? + %li + = link_to 'Remove user', admin_user_path(user), + data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, + method: :delete %li - = link_to 'Delete user', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All issues, merge requests and groups linked to this user will also be removed! Consider cancelling this deletion and blocking the user instead. Are you sure?" }, - class: 'btn btn-remove btn-block', - method: :delete + = link_to 'Remove user and contributions', admin_user_path(user, hard_delete: true), + data: { confirm: "USER #{user.name} WILL BE REMOVED! All issues, merge requests and comments authored by this user, and groups owned solely by them, will also be removed! Are you sure?" }, + class: 'btn btn-remove btn-block', + method: :delete |