Skip to content
Snippets Groups Projects
Commit 05e98306 authored by Nick Thomas's avatar Nick Thomas
Browse files

Allow admins to delete users from the admin users page

parent f07aee72
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -34,7 +34,7 @@
- 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 user.can_be_removed? && can?(current_user, :destroy_user, user)
%li.divider
%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?" },
Loading
Loading
---
title: Allow admins to delete users from the admin users page
merge_request: 11852
author:
Loading
Loading
@@ -21,6 +21,8 @@ describe "Admin::Users", feature: true do
expect(page).to have_content(current_user.name)
expect(page).to have_content(user.email)
expect(page).to have_content(user.name)
expect(page).to have_link('Block', href: block_admin_user_path(user))
expect(page).to have_link('Delete', href: admin_user_path(user))
end
 
describe 'Two-factor Authentication filters' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment