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
a5d7fc81
Commit
a5d7fc81
authored
Aug 25, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make LDAP sync time configurable.
parent
2f8f0734
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
app/models/user.rb
app/models/user.rb
+1
-1
config/gitlab.yml.example
config/gitlab.yml.example
+8
-2
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-0
No files found.
app/models/user.rb
View file @
a5d7fc81
...
...
@@ -419,7 +419,7 @@ class User < ActiveRecord::Base
if
!
Gitlab
.
config
.
ldap
.
enabled
false
elsif
ldap_user?
!
last_credential_check_at
||
(
last_credential_check_at
+
1
.
hour
)
<
Time
.
now
!
last_credential_check_at
||
(
last_credential_check_at
+
Gitlab
.
config
.
ldap
[
'sync_time'
]
)
<
Time
.
now
else
false
end
...
...
config/gitlab.yml.example
View file @
a5d7fc81
...
...
@@ -134,6 +134,12 @@ production: &base
method: 'ssl' # "tls" or "ssl" or "plain"
bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
password: '_the_password_of_the_bind_user'
# This setting is used to change how often LDAP group membership is updated.
# WARNING! Be advised that changing this setting can have severe performance consequences!
# Default: 1 hour.
# sync_time: 3600
# If allow_username_or_email_login is enabled, GitLab will ignore everything
# after the first '@' in the LDAP username submitted by the user on login.
#
...
...
@@ -279,9 +285,9 @@ test:
port: 80
# When you run tests we clone and setup gitlab-shell
# In order to setup it correctly you need to specify
# In order to setup it correctly you need to specify
# your system username you use to run GitLab
# user: YOUR_USERNAME
# user: YOUR_USERNAME
satellites:
path: tmp/tests/gitlab-satellites/
gitlab_shell:
...
...
config/initializers/1_settings.rb
View file @
a5d7fc81
...
...
@@ -57,6 +57,7 @@ end
Settings
[
'ldap'
]
||=
Settingslogic
.
new
({})
Settings
.
ldap
[
'enabled'
]
=
false
if
Settings
.
ldap
[
'enabled'
].
nil?
Settings
.
ldap
[
'allow_username_or_email_login'
]
=
false
if
Settings
.
ldap
[
'allow_username_or_email_login'
].
nil?
Settings
.
ldap
[
'sync_time'
]
=
3600
if
Settings
.
ldap
[
'sync_time'
].
nil?
Settings
[
'omniauth'
]
||=
Settingslogic
.
new
({})
...
...
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