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
0
Merge Requests
0
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
Kazuhiko Shiozaki
gitlab-ce
Commits
0223b58f
Commit
0223b58f
authored
Mar 10, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explain LDAP "lock" behavior
parent
cda0b7e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
lib/gitlab/ldap/access.rb
lib/gitlab/ldap/access.rb
+6
-2
No files found.
lib/gitlab/ldap/access.rb
View file @
0223b58f
...
...
@@ -7,10 +7,14 @@ module Gitlab
class
Access
attr_reader
:provider
,
:user
LOCK_TIMEOUT
=
600
# This timeout acts as a throttle on LDAP user checks. Its value of 600
# seconds (10 minutes) means that after calling try_lock_user for user
# janedoe, no new LDAP checks can start for that user for the next 10
# minutes.
LEASE_TIMEOUT
=
600
def
self
.
try_lock_user
(
user
)
Gitlab
::
ExclusiveLease
.
new
(
"user_ldap_check:
#{
user
.
id
}
"
,
L
OCK
_TIMEOUT
).
try_obtain
Gitlab
::
ExclusiveLease
.
new
(
"user_ldap_check:
#{
user
.
id
}
"
,
L
EASE
_TIMEOUT
).
try_obtain
end
def
self
.
open
(
user
,
&
block
)
...
...
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