diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-09-12 06:49:52 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-09-12 06:49:52 +0300 |
commit | 621affecb59b8ce5304370cfd7979fba2b73ff4e (patch) | |
tree | 2ff46b99e940d09b79c1929dae7a7ceeb7c02685 /config | |
parent | 40eec08c99fe29963afed0f073b7bdbbfe31ac59 (diff) | |
parent | 0dd94cd86ec0680432e58f2630a3a35fa84afd73 (diff) | |
download | gitlab-ce-621affecb59b8ce5304370cfd7979fba2b73ff4e.tar.gz |
Merge branch 'master' of https://github.com/funglaub/gitlabhq into funglaub-master
Conflicts:
Gemfile.lock
app/helpers/application_helper.rb
app/views/devise/sessions/new.html.erb
db/schema.rb
Diffstat (limited to 'config')
-rw-r--r-- | config/gitlab.yml.example | 18 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 18 |
2 files changed, 31 insertions, 5 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 08e3427f900..809d7ee905f 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -50,3 +50,21 @@ git: git_max_size: 5242880 # 5.megabytes # Git timeout to read commit, in seconds git_timeout: 10 + +# Omniauth configuration +omniauth: + enabled: false + providers: + allow_single_sign_on: false + block_auto_created_users: true + +# omniauth: +# enabled: true +# providers: +# - { name: 'google_oauth2', app_id: 'YOUR APP ID', +# app_secret: 'YOUR APP SECRET', +# args: { access_type: 'offline', approval_prompt: '' } } +# - { name: 'twitter', app_id: 'YOUR APP ID', +# app_secret: 'YOUR APP SECRET'} +# - { name: 'github', app_id: 'YOUR APP ID', +# app_secret: 'YOUR APP SECRET' } diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index df9ccf32194..00b7cc092d3 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -6,7 +6,7 @@ class Settings < Settingslogic self.web['protocol'] ||= web.https ? "https" : "http" end - def web_host + def web_host self.web['host'] ||= 'localhost' end @@ -14,11 +14,11 @@ class Settings < Settingslogic self.email['from'] ||= ("notify@" + web_host) end - def url + def url self['url'] ||= build_url - end + end - def web_port + def web_port if web.https web['port'] = 443 else @@ -36,7 +36,7 @@ class Settings < Settingslogic raw_url << web_host if web_custom_port? - raw_url << ":#{web_port}" + raw_url << ":#{web_port}" end raw_url @@ -120,6 +120,14 @@ class Settings < Settingslogic app['backup_keep_time'] || 0 end + def omniauth_enabled? + omniauth['enabled'] || false + end + + def omniauth_providers + omniauth['providers'] || [] + end + def disable_gravatar? app['disable_gravatar'] || false end |