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
ecb69f22
Commit
ecb69f22
authored
Jan 12, 2022
by
Peter Hegman
Committed by
Paul Slaughter
Jan 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Indicate locked users in Admin Area
Also document how to unlock a user from the Admin Area Changelog: added
parent
3e98649b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
8 deletions
+48
-8
app/views/admin/users/_head.html.haml
app/views/admin/users/_head.html.haml
+9
-6
doc/security/img/unlock_user_v14_7.png
doc/security/img/unlock_user_v14_7.png
+0
-0
doc/security/unlock_user.md
doc/security/unlock_user.md
+16
-2
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/features/admin/users/user_spec.rb
spec/features/admin/users/user_spec.rb
+20
-0
No files found.
app/views/admin/users/_head.html.haml
View file @
ecb69f22
...
...
@@ -3,23 +3,26 @@
%h3
.page-title.gl-m-0
=
@user
.
name
-
if
@user
.
blocked_pending_approval?
%span
.
cred
%span
.
gl-text-red-500
=
s_
(
'AdminUsers|(Pending approval)'
)
-
elsif
@user
.
banned?
%span
.
cred
%span
.
gl-text-red-500
=
s_
(
'AdminUsers|(Banned)'
)
-
elsif
@user
.
blocked?
%span
.
cred
%span
.
gl-text-red-500
=
s_
(
'AdminUsers|(Blocked)'
)
-
if
@user
.
internal?
%span
.
cred
%span
.
gl-text-red-500
=
s_
(
'AdminUsers|(Internal)'
)
-
if
@user
.
admin
%span
.
cred
%span
.
gl-text-red-500
=
s_
(
'AdminUsers|(Admin)'
)
-
if
@user
.
deactivated?
%span
.
cred
%span
.
gl-text-red-500
=
s_
(
'AdminUsers|(Deactivated)'
)
-
if
@user
.
access_locked?
%span
.gl-text-red-500
=
s_
(
'AdminUsers|(Locked)'
)
=
render_if_exists
'admin/users/auditor_user_badge'
=
render_if_exists
'admin/users/gma_user_badge'
...
...
doc/security/img/unlock_user_v14_7.png
0 → 100644
View file @
ecb69f22
30.9 KB
doc/security/unlock_user.md
View file @
ecb69f22
...
...
@@ -5,9 +5,23 @@ info: To determine the technical writer assigned to the Stage/Group associated w
type
:
howto
---
#
How to unlock a locked user from the command line
**(FREE SELF)**
#
Locked users
**(FREE SELF)**
After ten failed login attempts a user gets in a locked state.
Users are locked after ten failed sign-in attempts. These users remain locked:
-
For 10 minutes, after which time they are automatically unlocked.
-
Until an admin unlocks them from the
[
Admin Area
](
../user/admin_area/index.md
)
or the command line in under 10 minutes.
## Unlock a user from the Admin Area
1.
On the top bar, select
**Menu > Admin**
.
1.
On the left sidebar, select
**Overview > Users**
.
1.
Use the search bar to find the locked user.
1.
From the
**User administration**
dropdown select
**Unlock**
.
![
Unlock a user from the Admin Area
](
img/unlock_user_v14_7.png
)
## Unlock a user from the command line
To unlock a locked user:
...
...
locale/gitlab.pot
View file @
ecb69f22
...
...
@@ -2645,6 +2645,9 @@ msgstr ""
msgid "AdminUsers|(Internal)"
msgstr ""
msgid "AdminUsers|(Locked)"
msgstr ""
msgid "AdminUsers|(Pending approval)"
msgstr ""
...
...
spec/features/admin/users/user_spec.rb
View file @
ecb69f22
...
...
@@ -125,6 +125,26 @@ RSpec.describe 'Admin::Users::User' do
end
end
context
'when a user is locked'
,
time_travel_to:
'2020-02-02 10:30:45 -0700'
do
let_it_be
(
:locked_user
)
{
create
(
:user
,
locked_at:
DateTime
.
parse
(
'2020-02-02 10:30:00 -0700'
))
}
before
do
visit
admin_user_path
(
locked_user
)
end
it
"displays `(Locked)` next to user's name"
do
expect
(
page
).
to
have_content
(
"
#{
locked_user
.
name
}
(Locked)"
)
end
it
'allows a user to be unlocked from the `User administration dropdown'
,
:js
do
accept_gl_confirm
(
"Unlock user
#{
locked_user
.
name
}
?"
,
button_text:
'Unlock'
)
do
click_action_in_user_dropdown
(
locked_user
.
id
,
'Unlock'
)
end
expect
(
page
).
not_to
have_content
(
"
#{
locked_user
.
name
}
(Locked)"
)
end
end
describe
'Impersonation'
do
let_it_be
(
:another_user
)
{
create
(
:user
)
}
...
...
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