Commit 80640413 authored by Marin Jankovski's avatar Marin Jankovski

Add time configuration option for LDAP user daily sync.

parent 51eda1cb
......@@ -210,6 +210,11 @@ production: &base
#
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
# 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.
......
......@@ -77,6 +77,8 @@ if Settings.ldap['enabled'] || Rails.env.test?
server['provider_name'] ||= "ldap#{key}".downcase
server['sync_time'] = 3600 if server['sync_time'].nil?
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
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment