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
80640413
Commit
80640413
authored
Oct 29, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add time configuration option for LDAP user daily sync.
parent
51eda1cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
config/gitlab.yml.example
config/gitlab.yml.example
+5
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+2
-0
No files found.
config/gitlab.yml.example
View file @
80640413
...
@@ -210,6 +210,11 @@ production: &base
...
@@ -210,6 +210,11 @@ production: &base
#
#
sync_ssh_keys: false
sync_ssh_keys: false
# GitLab will refresh LDAP user membership once a day.
# Default time of the day when this will happen is at 1:30am server time.
schedule_sync_hour: 1 # Hour of the day. Value from 0-23.
schedule_sync_minute: 30 # Minute of the hour. Value from 0-59.
# GitLab EE only: add more LDAP servers
# GitLab EE only: add more LDAP servers
# Choose an ID made of a-z and 0-9 . This ID will be stored in the database
# Choose an ID made of a-z and 0-9 . This ID will be stored in the database
# so that GitLab can remember which LDAP server a user belongs to.
# so that GitLab can remember which LDAP server a user belongs to.
...
...
config/initializers/1_settings.rb
View file @
80640413
...
@@ -77,6 +77,8 @@ if Settings.ldap['enabled'] || Rails.env.test?
...
@@ -77,6 +77,8 @@ if Settings.ldap['enabled'] || Rails.env.test?
server
[
'provider_name'
]
||=
"ldap
#{
key
}
"
.
downcase
server
[
'provider_name'
]
||=
"ldap
#{
key
}
"
.
downcase
server
[
'sync_time'
]
=
3600
if
server
[
'sync_time'
].
nil?
server
[
'sync_time'
]
=
3600
if
server
[
'sync_time'
].
nil?
server
[
'provider_class'
]
=
OmniAuth
::
Utils
.
camelize
(
server
[
'provider_name'
])
server
[
'provider_class'
]
=
OmniAuth
::
Utils
.
camelize
(
server
[
'provider_name'
])
server
[
'schedule_sync_hour'
]
=
1
if
server
[
'schedule_sync_hour'
].
nil?
server
[
'schedule_sync_minute'
]
=
30
if
server
[
'schedule_sync_minute'
].
nil?
Settings
.
ldap
[
'servers'
][
key
]
=
server
Settings
.
ldap
[
'servers'
][
key
]
=
server
end
end
end
end
...
...
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