summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-04 16:42:36 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-04 16:42:36 +0200
commitb48b07044b919c07de34434aea7cdba13d7c38a6 (patch)
tree5a6d9d8de1048280a595825aa5f47464455ad670 /config
parentc17f5d06aa4a55a8446928ea6b690ae8e09ce237 (diff)
parent326b827ce39f998ce75f58e9f649e6b50623f1aa (diff)
downloadgitlab-ce-b48b07044b919c07de34434aea7cdba13d7c38a6.tar.gz
Merge branch 'master' into drop-satellites
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'config')
-rw-r--r--config/application.rb1
-rw-r--r--config/gitlab.yml.example28
-rw-r--r--config/initializers/1_settings.rb1
-rw-r--r--config/initializers/7_omniauth.rb1
-rw-r--r--config/initializers/doorkeeper.rb3
-rw-r--r--config/initializers/redis-store-fix-expiry.rb44
-rw-r--r--config/routes.rb2
7 files changed, 26 insertions, 54 deletions
diff --git a/config/application.rb b/config/application.rb
index 7e899cc3b5b..a96e22211e6 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -96,6 +96,7 @@ module Gitlab
end
redis_config_hash[:namespace] = 'cache:gitlab'
+ redis_config_hash[:expires_in] = 2.weeks # Cache should not grow forever
config.cache_store = :redis_store, redis_config_hash
# This is needed for gitlab-shell
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index c32ac2042d0..56770335ddc 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -209,20 +209,29 @@ production: &base
# arguments, followed by optional 'args' which can be either a hash or an array.
# Documentation for this is available at http://doc.gitlab.com/ce/integration/omniauth.html
providers:
- # - { name: 'google_oauth2', app_id: 'YOUR_APP_ID',
+ # - { name: 'google_oauth2',
+ # label: 'Google',
+ # 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',
+ # - { name: 'twitter',
+ # app_id: 'YOUR_APP_ID',
+ # app_secret: 'YOUR_APP_SECRET' }
+ # - { name: 'github',
+ # label: 'GitHub',
+ # app_id: 'YOUR_APP_ID',
# app_secret: 'YOUR_APP_SECRET',
# args: { scope: 'user:email' } }
- # - { name: 'gitlab', app_id: 'YOUR_APP_ID',
+ # - { name: 'gitlab',
+ # label: 'GitLab.com',
+ # app_id: 'YOUR_APP_ID',
# app_secret: 'YOUR_APP_SECRET',
# args: { scope: 'api' } }
- # - { name: 'bitbucket', app_id: 'YOUR_APP_ID',
- # app_secret: 'YOUR_APP_SECRET'}
- # - { name: 'saml',
+ # - { name: 'bitbucket',
+ # app_id: 'YOUR_APP_ID',
+ # app_secret: 'YOUR_APP_SECRET' }
+ # - { name: 'saml',
+ # label: 'Our SAML Provider',
# args: {
# assertion_consumer_service_url: 'https://gitlab.example.com/users/auth/saml/callback',
# idp_cert_fingerprint: '43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8',
@@ -247,6 +256,7 @@ production: &base
## Backup settings
backup:
path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
+ # archive_permissions: 0640 # Permissions for the resulting backup.tar file (default: 0600)
# keep_time: 604800 # default: 0 (forever) (in seconds)
# upload:
# # Fog storage connection settings, see http://fog.io/storage/ .
@@ -338,6 +348,8 @@ test:
# user: YOUR_USERNAME
satellites:
path: tmp/tests/gitlab-satellites/
+ backup:
+ path: tmp/tests/backups
gitlab_shell:
path: tmp/tests/gitlab-shell/
repos_path: tmp/tests/repositories/
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 7b5d488f59e..bd76c918485 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -170,6 +170,7 @@ Settings.gitlab_shell['ssh_path_prefix'] ||= Settings.send(:build_gitlab_shell_s
Settings['backup'] ||= Settingslogic.new({})
Settings.backup['keep_time'] ||= 0
Settings.backup['path'] = File.expand_path(Settings.backup['path'] || "tmp/backups/", Rails.root)
+Settings.backup['archive_permissions'] ||= 0600
Settings.backup['upload'] ||= Settingslogic.new({ 'remote_directory' => nil, 'connection' => nil })
# Convert upload connection settings to use symbol keys, to make Fog happy
if Settings.backup['upload']['connection']
diff --git a/config/initializers/7_omniauth.rb b/config/initializers/7_omniauth.rb
index df73ec1304a..7f73546ac89 100644
--- a/config/initializers/7_omniauth.rb
+++ b/config/initializers/7_omniauth.rb
@@ -11,6 +11,7 @@ if Gitlab::LDAP::Config.enabled?
end
end
+OmniAuth.config.full_host = Settings.gitlab['url']
OmniAuth.config.allowed_request_methods = [:post]
#In case of auto sign-in, the GET method is used (users don't get to click on a button)
OmniAuth.config.allowed_request_methods << :get if Gitlab.config.omniauth.auto_sign_in_with_provider.present?
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb
index d422acb31d6..6139ddbe6cd 100644
--- a/config/initializers/doorkeeper.rb
+++ b/config/initializers/doorkeeper.rb
@@ -6,7 +6,8 @@ Doorkeeper.configure do
# This block will be called to check whether the resource owner is authenticated or not.
resource_owner_authenticator do
# Put your resource owner authentication logic here.
- # Example implementation:
+ # Ensure user is redirected to redirect_uri after login
+ session[:user_return_to] = request.fullpath
current_user || redirect_to(new_user_session_url)
end
diff --git a/config/initializers/redis-store-fix-expiry.rb b/config/initializers/redis-store-fix-expiry.rb
deleted file mode 100644
index fce0a135330..00000000000
--- a/config/initializers/redis-store-fix-expiry.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# Monkey-patch Redis::Store to make 'setex' and 'expire' work with namespacing
-
-module Gitlab
- class Redis
- class Store
- module Namespace
- # Redis::Store#setex in redis-store 1.1.4 does not respect namespaces;
- # this new method does.
- def setex(key, expires_in, value, options=nil)
- namespace(key) { |key| super(key, expires_in, value) }
- end
-
- # Redis::Store#expire in redis-store 1.1.4 does not respect namespaces;
- # this new method does.
- def expire(key, expires_in)
- namespace(key) { |key| super(key, expires_in) }
- end
-
- private
-
- # Our new definitions of #setex and #expire above assume that the
- # #namespace method exists. Because we cannot be sure of that, we
- # re-implement the #namespace method from Redis::Store::Namespace so
- # that it is available for all Redis::Store instances, whether they use
- # namespacing or not.
- #
- # Based on lib/redis/store/namespace.rb L49-51 (redis-store 1.1.4)
- def namespace(key)
- if @namespace
- yield interpolate(key)
- else
- # This Redis::Store instance does not use a namespace so we should
- # just pass through the key.
- yield key
- end
- end
- end
- end
- end
-end
-
-Redis::Store.class_eval do
- include Gitlab::Redis::Store::Namespace
-end
diff --git a/config/routes.rb b/config/routes.rb
index 704cf705870..2436aae2b5a 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -481,7 +481,7 @@ Gitlab::Application.routes.draw do
end
end
- resources :milestones, except: [:destroy], constraints: { id: /\d+/ } do
+ resources :milestones, constraints: { id: /\d+/ } do
member do
put :sort_issues
put :sort_merge_requests