Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2ae76872
Commit
2ae76872
authored
Nov 19, 2020
by
sfang97
Committed by
serenafang
Dec 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't render other delete buttons if pending
If pending approval, only need approve and reject buttons
parent
0a0d5580
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
42 deletions
+42
-42
app/views/admin/users/show.html.haml
app/views/admin/users/show.html.haml
+42
-42
No files found.
app/views/admin/users/show.html.haml
View file @
2ae76872
...
...
@@ -206,52 +206,52 @@
%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 gl-button btn-info"
,
data:
{
confirm:
'Are you sure?'
}
-
if
!
@user
.
blocked_pending_approval?
.card.border-danger
.card-header.bg-danger.text-white
=
s_
(
'AdminUsers|Delete user'
)
.card-body
-
if
@user
.
can_be_removed?
&&
can?
(
current_user
,
:destroy_user
,
@user
)
%p
Deleting a user has the following effects:
=
render
'users/deletion_guidance'
,
user:
@user
%br
%button
.delete-user-button.btn.gl-button.btn-danger
{
data:
{
'gl-modal-action'
:
'delete'
,
delete_user_url:
admin_user_path
(
@user
),
block_user_url:
block_admin_user_path
(
@user
),
username:
sanitize_name
(
@user
.
name
)
}
}
=
s_
(
'AdminUsers|Delete user'
)
-
else
-
if
@user
.
solo_owned_groups
.
present?
%p
This user is currently an owner in these groups:
%strong
=
@user
.
solo_owned_groups
.
map
(
&
:name
).
join
(
', '
)
%p
You must transfer ownership or delete these groups before you can delete this user.
-
else
%p
You don't have access to delete this user.
.card.border-danger
.card-header.bg-danger.text-white
=
s_
(
'AdminUsers|Delete user'
)
.card-body
-
if
@user
.
can_be_removed?
&&
can?
(
current_user
,
:destroy_user
,
@user
)
%p
Deleting a user has the following effects:
=
render
'users/deletion_guidance'
,
user:
@user
%br
%button
.delete-user-button.btn.gl-button.btn-danger
{
data:
{
'gl-modal-action'
:
'delete'
,
delete_user_url:
admin_user_path
(
@user
),
block_user_url:
block_admin_user_path
(
@user
),
username:
sanitize_name
(
@user
.
name
)
}
}
=
s_
(
'AdminUsers|Delete user'
)
-
else
-
if
@user
.
solo_owned_groups
.
present?
%p
This user is currently an owner in these groups:
%strong
=
@user
.
solo_owned_groups
.
map
(
&
:name
).
join
(
', '
)
.card.border-danger
.card-header.bg-danger.text-white
=
s_
(
'AdminUsers|Delete user and contributions'
)
.card-body
-
if
can?
(
current_user
,
:destroy_user
,
@user
)
%p
You must transfer ownership or delete these groups before you can delete this user.
This option deletes the user and any contributions that
would usually be moved to the
=
succeed
"."
do
=
link_to
"system ghost user"
,
help_page_path
(
"user/profile/account/delete_account"
)
As well as the user's personal projects, groups owned solely by
the user, and projects in them, will also be removed. Commits
to other projects are unaffected.
%br
%button
.delete-user-button.btn.gl-button.btn-danger
{
data:
{
'gl-modal-action'
:
'delete-with-contributions'
,
delete_user_url:
admin_user_path
(
@user
,
hard_delete:
true
),
block_user_url:
block_admin_user_path
(
@user
),
username:
@user
.
name
}
}
=
s_
(
'AdminUsers|Delete user and contributions'
)
-
else
%p
You don't have access to delete this user.
.card.border-danger
.card-header.bg-danger.text-white
=
s_
(
'AdminUsers|Delete user and contributions'
)
.card-body
-
if
can?
(
current_user
,
:destroy_user
,
@user
)
%p
This option deletes the user and any contributions that
would usually be moved to the
=
succeed
"."
do
=
link_to
"system ghost user"
,
help_page_path
(
"user/profile/account/delete_account"
)
As well as the user's personal projects, groups owned solely by
the user, and projects in them, will also be removed. Commits
to other projects are unaffected.
%br
%button
.delete-user-button.btn.gl-button.btn-danger
{
data:
{
'gl-modal-action'
:
'delete-with-contributions'
,
delete_user_url:
admin_user_path
(
@user
,
hard_delete:
true
),
block_user_url:
block_admin_user_path
(
@user
),
username:
@user
.
name
}
}
=
s_
(
'AdminUsers|Delete user and contributions'
)
-
else
%p
You don't have access to delete this user.
=
render
partial:
'admin/users/modals'
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