diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-14 17:09:05 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-14 17:09:05 +0200 |
commit | 238e4f02954e910cab14c0be3b8b2569e08b5e87 (patch) | |
tree | ca213522b823f53b08b85cef4818d8390b411d39 /config | |
parent | c43411e97aae85386ab50f9caf5ad8be481fb91c (diff) | |
download | gitlab-ce-238e4f02954e910cab14c0be3b8b2569e08b5e87.tar.gz |
Add config var to block auto-created LDAP users.
Diffstat (limited to 'config')
-rw-r--r-- | config/gitlab.yml.example | 3 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 46b9f05cc17..6a78a032c58 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -146,6 +146,9 @@ production: &base # disable this setting, because the userPrincipalName contains an '@'. allow_username_or_email_login: false + # Locks down those users until they have been cleared by the admin (default: false). + block_auto_created_users: false + # Base where we can search for users # # Ex. ou=People,dc=gitlab,dc=example diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index d5cddb8dbf0..0abd34fc3e0 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -76,6 +76,7 @@ if Settings.ldap['enabled'] || Rails.env.test? Settings.ldap['servers'].each do |key, server| server['label'] ||= 'LDAP' + server['block_auto_created_users'] = false if server['block_auto_created_users'].nil? server['allow_username_or_email_login'] = false if server['allow_username_or_email_login'].nil? server['active_directory'] = true if server['active_directory'].nil? server['provider_name'] ||= "ldap#{key}".downcase |