BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
05e98306
Commit
05e98306
authored
Jun 01, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow admins to delete users from the admin users page
parent
f07aee72
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
_user.html.haml
app/views/admin/users/_user.html.haml
+1
-1
33207-show-delete-option-in-admin-users-page.yml
...released/33207-show-delete-option-in-admin-users-page.yml
+4
-0
admin_users_spec.rb
spec/features/admin/admin_users_spec.rb
+2
-0
No files found.
app/views/admin/users/_user.html.haml
View file @
05e98306
...
...
@@ -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?"
},
...
...
changelogs/unreleased/33207-show-delete-option-in-admin-users-page.yml
0 → 100644
View file @
05e98306
---
title
:
Allow admins to delete users from the admin users page
merge_request
:
11852
author
:
spec/features/admin/admin_users_spec.rb
View file @
05e98306
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment