Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb3
-rw-r--r--config/gitlab.yml.example23
-rw-r--r--config/initializers/1_settings.rb10
-rw-r--r--config/initializers/devise_password_length.rb.example6
-rw-r--r--config/initializers/rack_attack.rb.example3
-rw-r--r--config/initializers/session_store.rb2
-rw-r--r--config/routes.rb10
7 files changed, 38 insertions, 19 deletions
diff --git a/config/application.rb b/config/application.rb
index dec1940a4a3..88759ce7cf3 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -12,7 +12,7 @@ module Gitlab
# -- all .rb files in that directory are automatically loaded.
# Custom directories with classes and modules you want to be autoloadable.
- config.autoload_paths += %W(#{config.root}/lib #{config.root}/app/models/concerns)
+ config.autoload_paths += %W(#{config.root}/lib #{config.root}/app/models/concerns #{config.root}/app/models/project_services)
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
@@ -38,6 +38,7 @@ module Gitlab
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
+ config.i18n.enforce_available_locales = false
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index f6d1a3c9e80..ce57465d687 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -14,7 +14,7 @@ production: &base
## GitLab settings
gitlab:
- ## Web server settings
+ ## Web server settings (note: host is the FQDN, do not include http://)
host: localhost
port: 80
https: false
@@ -65,7 +65,7 @@ production: &base
# If a commit message matches this regular expression, all issues referenced from the matched text will be closed.
# This happens when the commit is pushed or merged into the default branch of a project.
# When not specified the default issue_closing_pattern as specified below will be used.
- # issue_closing_pattern: ([Cc]lose[sd]|[Ff]ixe[sd]) +#\d+
+ # issue_closing_pattern: '([Cc]lose[sd]|[Ff]ixe[sd]) +#\d+'
## Default project features settings
default_projects_features:
@@ -116,8 +116,8 @@ production: &base
# ==========================
## LDAP settings
- # You can inspect the first 100 LDAP users with login access by running:
- # bundle exec rake gitlab:ldap:check[100] RAILS_ENV=production
+ # You can inspect a sample of the LDAP users with login access by running:
+ # bundle exec rake gitlab:ldap:check RAILS_ENV=production
ldap:
enabled: false
host: '_your_ldap_server'
@@ -127,6 +127,15 @@ production: &base
method: 'ssl' # "tls" or "ssl" or "plain"
bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
password: '_the_password_of_the_bind_user'
+ # If allow_username_or_email_login is enabled, GitLab will ignore everything
+ # after the first '@' in the LDAP username submitted by the user on login.
+ #
+ # Example:
+ # - the user enters 'jane.doe@example.com' and 'p@ssw0rd' as LDAP credentials;
+ # - GitLab queries the LDAP server with 'jane.doe' and 'p@ssw0rd'.
+ #
+ # If you are using "uid: 'userPrincipalName'" on ActiveDirectory you need to
+ # disable this setting, because the userPrincipalName contains an '@'.
allow_username_or_email_login: true
## OmniAuth settings
@@ -154,7 +163,8 @@ production: &base
# - { name: 'twitter', app_id: 'YOUR APP ID',
# app_secret: 'YOUR APP SECRET'}
# - { name: 'github', app_id: 'YOUR APP ID',
- # app_secret: 'YOUR APP SECRET' }
+ # app_secret: 'YOUR APP SECRET',
+ # args: { scope: 'user:email' } }
@@ -192,7 +202,8 @@ production: &base
# Use the default values unless you really know what you are doing
git:
bin_path: /usr/bin/git
- # Max size of a git object (e.g. a commit), in bytes
+ # The next value is the maximum memory size grit can use
+ # Given in number of bytes per git object (e.g. a commit)
# This value can be increased if you have very large commits
max_size: 5242880 # 5.megabytes
# Git timeout to read a commit, in seconds
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index ea391ca601c..cf6c79bb50e 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -3,8 +3,8 @@ class Settings < Settingslogic
namespace Rails.env
class << self
- def gitlab_on_non_standard_port?
- ![443, 80].include?(gitlab.port.to_i)
+ def gitlab_on_standard_port?
+ gitlab.port.to_i == (gitlab.https ? 443 : 80)
end
private
@@ -18,11 +18,7 @@ class Settings < Settingslogic
end
def build_gitlab_url
- if gitlab_on_non_standard_port?
- custom_port = ":#{gitlab.port}"
- else
- custom_port = nil
- end
+ custom_port = gitlab_on_standard_port? ? nil : ":#{gitlab.port}"
[ gitlab.protocol,
"://",
gitlab.host,
diff --git a/config/initializers/devise_password_length.rb.example b/config/initializers/devise_password_length.rb.example
new file mode 100644
index 00000000000..97305825e07
--- /dev/null
+++ b/config/initializers/devise_password_length.rb.example
@@ -0,0 +1,6 @@
+Devise.setup do |config|
+ # The following line changes the password length limits for new users. In the
+ # example below the minimum length is 12 characters, and the maximum length
+ # is 128 characters.
+ config.password_length = 12..128
+end
diff --git a/config/initializers/rack_attack.rb.example b/config/initializers/rack_attack.rb.example
index 1d10a53d505..bc3234bf0b6 100644
--- a/config/initializers/rack_attack.rb.example
+++ b/config/initializers/rack_attack.rb.example
@@ -7,7 +7,8 @@ paths_to_be_protected = [
"#{Rails.application.config.relative_url_root}/users/sign_in",
"#{Rails.application.config.relative_url_root}/api/#{API::API.version}/session.json",
"#{Rails.application.config.relative_url_root}/api/#{API::API.version}/session",
- "#{Rails.application.config.relative_url_root}/users"
+ "#{Rails.application.config.relative_url_root}/users",
+ "#{Rails.application.config.relative_url_root}/users/confirmation"
]
unless Rails.env.test?
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index 467f9477392..f80b67a554b 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -4,7 +4,7 @@ Gitlab::Application.config.session_store(
:redis_store, # Using the cookie_store would enable session replay attacks.
servers: Gitlab::Application.config.cache_store.last, # re-use the Redis config from the Rails cache store
key: '_gitlab_session',
- secure: Gitlab::Application.config.force_ssl,
+ secure: Gitlab.config.gitlab.https,
httponly: true,
path: (Rails.application.config.relative_url_root.nil?) ? '/' : Rails.application.config.relative_url_root
)
diff --git a/config/routes.rb b/config/routes.rb
index 188d2099997..77247163def 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -6,6 +6,7 @@ Gitlab::Application.routes.draw do
# Search
#
get 'search' => "search#show"
+ get 'search/autocomplete' => "search#autocomplete", as: :search_autocomplete
# API
API::API.logger Rails.logger
@@ -99,8 +100,6 @@ Gitlab::Application.routes.draw do
root to: "dashboard#index"
end
- get "errors/githost"
-
#
# Profile Area
#
@@ -157,6 +156,9 @@ Gitlab::Application.routes.draw do
end
resources :users_groups, only: [:create, :update, :destroy]
+ scope module: :groups do
+ resource :avatar, only: [:destroy]
+ end
end
resources :projects, constraints: { id: /[^\/]+/ }, only: [:new, :create]
@@ -170,6 +172,8 @@ Gitlab::Application.routes.draw do
member do
put :transfer
post :fork
+ post :archive
+ post :unarchive
get :autocomplete_sources
end
@@ -215,7 +219,7 @@ Gitlab::Application.routes.draw do
resource :repository, only: [:show] do
member do
get "stats"
- get "archive"
+ get "archive", constraints: { format: Gitlab::Regex.archive_formats_regex }
end
end