summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-03 10:02:45 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-03 10:02:45 +0000
commit0df317f7297b9a72e888edc09aed51f83414f92a (patch)
tree2308501b912c31a60358481087e0fe6a752bbb1e /config
parent0d0c539c047fdf3b7460d4044fc33a4505c1143b (diff)
parenteb4f1eb5f55fe3630c9191db1b9da2dc92437391 (diff)
downloadgitlab-ce-0df317f7297b9a72e888edc09aed51f83414f92a.tar.gz
Merge branch 'restrict-signups-to-domains' into 'master'
Add application setting to restrict user signups to e-mail domains This feature was requested long ago: http://feedback.gitlab.com/forums/176466-general/suggestions/4118466-ability-to-register-only-from-ceratain-domains This MR is based off !253 but changed to use application settings and use wildcard strings to give more flexibility in pattern matching. Regexps seemed overkill and prone to mistakes. Also note that validation is ONLY done on creation to prevent breaking existing users who do not have a whitelisted domain. However, this allows a user to sign-up and change his/her email to a non-whitelisted domain. Screenshots: ![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b312046aae03971f37f4247382971fc6/image.png) ![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/94bdf3ffaf37c2e8324eff83308f81f0/image.png) See merge request !598
Diffstat (limited to 'config')
-rw-r--r--config/initializers/1_settings.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 0abd34fc3e0..e5ac66a2323 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -132,6 +132,7 @@ Settings.gitlab.default_projects_features['wiki'] = true if Settings.g
Settings.gitlab.default_projects_features['snippets'] = false if Settings.gitlab.default_projects_features['snippets'].nil?
Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE)
Settings.gitlab['repository_downloads_path'] = File.absolute_path(Settings.gitlab['repository_downloads_path'] || 'tmp/repositories', Rails.root)
+Settings.gitlab['restricted_signup_domains'] ||= []
#
# Gravatar