summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/database.yml.example39
-rw-r--r--config/database.yml.postgresql1
-rw-r--r--config/gitlab.yml.example83
-rw-r--r--config/initializers/1_settings.rb215
-rw-r--r--config/initializers/3_grit_ext.rb4
-rw-r--r--config/initializers/devise.rb24
-rw-r--r--config/locales/devise.en.yml2
-rw-r--r--config/routes.rb15
8 files changed, 282 insertions, 101 deletions
diff --git a/config/database.yml.example b/config/database.yml.example
deleted file mode 100644
index c5a2b8d605b..00000000000
--- a/config/database.yml.example
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# PRODUCTION
-#
-production:
- adapter: mysql2
- encoding: utf8
- reconnect: false
- database: gitlabhq_production
- pool: 5
- username: root
- password: "secure password"
- # host: localhost
- # socket: /tmp/mysql.sock
-
-#
-# Development specific
-#
-development:
- adapter: mysql2
- encoding: utf8
- reconnect: false
- database: gitlabhq_development
- pool: 5
- username: root
- password: "secure password"
- # socket: /tmp/mysql.sock
-
-# Warning: The database defined as "test" will be erased and
-# re-generated from your development database when you run "rake".
-# Do not set this db to the same as development or production.
-test: &test
- adapter: mysql2
- encoding: utf8
- reconnect: false
- database: gitlabhq_test
- pool: 5
- username: root
- password: "secure password"
- # socket: /tmp/mysql.sock
diff --git a/config/database.yml.postgresql b/config/database.yml.postgresql
index 17b38f3d385..0e873d2b8fb 100644
--- a/config/database.yml.postgresql
+++ b/config/database.yml.postgresql
@@ -9,6 +9,7 @@ production:
username: postgres
password:
# host: localhost
+ # port: 5432
# socket: /tmp/postgresql.sock
#
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 3568348971b..067dbd9b72b 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -1,55 +1,65 @@
-# # # # # # # # # # # # # # # # # #
+# # # # # # # # # # # # # # # # # #
# Gitlab application config file #
# # # # # # # # # # # # # # # # # #
#
-# 1. Common settings
+# 1. GitLab app settings
# ==========================
-# Web application specific settings
-web:
+## GitLab settings
+gitlab:
+ ## Web server settings
host: localhost
port: 80
https: false
-# Email used for notification
-# about new issues, comments
-email:
- from: notify@localhost
+ ## Email settings
+ # Email address used in the "From" field in mails sent by GitLab
+ email_from: gitlab@localhost
-# Application specific settings
-# Like default project limit for user etc
-app:
+ ## Project settings
default_projects_limit: 10
- # backup_path: "/vol/backups" # default: Rails.root + backups/
- # backup_keep_time: 604800 # default: 0 (forever) (in seconds)
- # disable_gravatar: true # default: false - Disable user avatars from Gravatar.com
+
+## Gravatar
+gravatar:
+ enabled: true # Use user avatar images from Gravatar.com (default: true)
+ # plain_url: "http://..." # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
+ # ssl_url: "https://..." # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
+
#
# 2. Auth settings
# ==========================
-ldap:
+
+## LDAP settings
+ldap:
enabled: false
host: '_your_ldap_server'
base: '_the_base_where_you_search_for_users'
port: 636
uid: 'sAMAccountName'
- method: 'ssl' # plain
+ method: 'ssl' # "ssl" or "plain"
bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
password: '_the_password_of_the_bind_user'
+## Omniauth settings
omniauth:
# Enable ability for users
- # to login via twitter, google ..
+ # Allow logging in via Twitter, Google, etc. using Omniauth providers
enabled: false
- # IMPORTANT!
- # It allows user to login without having user account
+ # CAUTION!
+ # This allows users to login without having a user account first (default: false)
+ # User accounts will be created automatically when authentication was successful.
allow_single_sign_on: false
+ # Locks down those users until they have been cleared by the admin (default: true)
block_auto_created_users: true
- # Auth providers
+ ## Auth providers
+ # Uncomment the lines and fill in the data of the auth provider you want to use
+ # If your favorite auth provider is not listed you can user others:
+ # see https://github.com/gitlabhq/gitlabhq/wiki/Using-Custom-Omniauth-Providers
providers:
# - { name: 'google_oauth2', app_id: 'YOUR APP ID',
# app_secret: 'YOUR APP SECRET',
@@ -60,29 +70,36 @@ omniauth:
# app_secret: 'YOUR APP SECRET' }
+
#
-# 3. Advanced settings:
+# 3. Advanced settings
# ==========================
-# Git Hosting configuration
-git_host:
+## Backup settings
+backup:
+ path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
+ # keep_time: 604800 # default: 0 (forever) (in seconds)
+
+## Gitolite settings
+gitolite:
admin_uri: git@localhost:gitolite-admin
- base_path: /home/git/repositories/
+ repos_path: /home/git/repositories/
hooks_path: /home/git/.gitolite/hooks/
- gitolite_admin_key: gitlab
- git_user: git
+ admin_key: gitlab
upload_pack: true
receive_pack: true
- # host: localhost
+ ssh_user: git
+ ssh_host: localhost
+ # ssh_port: 22
# config_file: gitolite.conf
- # port: 22
-# Git settings
-# Use default values unless you understand it
+## Git settings
+# CAUTION!
+# Use the default values unless you really know what you are doing
git:
- path: /usr/bin/git
+ bin_path: /usr/bin/git
# Max size of git object like commit, in bytes
# This value can be increased if you have a very large commits
- git_max_size: 5242880 # 5.megabytes
+ max_size: 5242880 # 5.megabytes
# Git timeout to read commit, in seconds
- git_timeout: 10
+ timeout: 10
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 32af3d07778..4fe3ced4d8d 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -2,23 +2,43 @@ class Settings < Settingslogic
source "#{Rails.root}/config/gitlab.yml"
class << self
+ # FIXME: Deprecated: remove for 4.1
def web_protocol
+ ActiveSupport::Deprecation.warn("Settings.web_protocol is deprecated and will be removed from GitLab 4.1", caller)
+ gitlab.protocol
+ rescue Settingslogic::MissingSetting
self.web['protocol'] ||= web.https ? "https" : "http"
end
+ # FIXME: Deprecated: remove for 4.1
def web_host
+ ActiveSupport::Deprecation.warn("Settings.web_host is deprecated and will be removed from GitLab 4.1", caller)
+ gitlab.host
+ rescue Settingslogic::MissingSetting
self.web['host'] ||= 'localhost'
end
+ # FIXME: Deprecated: remove for 4.1
def email_from
+ ActiveSupport::Deprecation.warn("Settings.email_from is deprecated and will be removed from GitLab 4.1", caller)
+ gitlab.email_from
+ rescue Settingslogic::MissingSetting
self.email['from'] ||= ("notify@" + web_host)
end
+ # FIXME: Deprecated: remove for 4.1
def url
+ ActiveSupport::Deprecation.warn("Settings.url is deprecated and will be removed from GitLab 4.1", caller)
+ gitlab.url
+ rescue Settingslogic::MissingSetting
self['url'] ||= build_url
end
+ # FIXME: Deprecated: remove for 4.1
def web_port
+ ActiveSupport::Deprecation.warn("Settings.web_port is deprecated and will be removed from GitLab 4.1", caller)
+ gitlab.port.to_i
+ rescue Settingslogic::MissingSetting
if web.https
web['port'] = 443
else
@@ -26,11 +46,17 @@ class Settings < Settingslogic
end.to_i
end
+ # FIXME: Deprecated: remove for 4.1
def web_custom_port?
+ ActiveSupport::Deprecation.warn("Settings.web_custom_port? is deprecated and will be removed from GitLab 4.1", caller)
+ gitlab_on_non_standard_port?
+ rescue Settingslogic::MissingSetting
![443, 80].include?(web_port)
end
+ # FIXME: Deprecated: remove for 4.1
def build_url
+ ActiveSupport::Deprecation.warn("Settings.build_url is deprecated and will be removed from GitLab 4.1", caller)
if web_custom_port?
custom_port = ":#{web_port}"
else
@@ -44,19 +70,35 @@ class Settings < Settingslogic
].join('')
end
+ # FIXME: Deprecated: remove for 4.1
def ssh_port
+ ActiveSupport::Deprecation.warn("Settings.ssh_port is deprecated and will be removed from GitLab 4.1", caller)
+ gitolite.ssh_port
+ rescue Settingslogic::MissingSetting
git_host['port'] || 22
end
+ # FIXME: Deprecated: remove for 4.1
def ssh_user
+ ActiveSupport::Deprecation.warn("Settings.ssh_user is deprecated and will be removed from GitLab 4.1", caller)
+ gitolite.ssh_user
+ rescue Settingslogic::MissingSetting
git_host['git_user'] || 'git'
end
+ # FIXME: Deprecated: remove for 4.1
def ssh_host
+ ActiveSupport::Deprecation.warn("Settings.ssh_host is deprecated and will be removed from GitLab 4.1", caller)
+ gitolite.ssh_host
+ rescue Settingslogic::MissingSetting
git_host['host'] || web_host || 'localhost'
end
+ # FIXME: Deprecated: remove for 4.1
def ssh_path
+ ActiveSupport::Deprecation.warn("Settings.ssh_path is deprecated and will be removed from GitLab 4.1", caller)
+ gitolite.ssh_path_prefix
+ rescue Settingslogic::MissingSetting
if ssh_port != 22
"ssh://#{ssh_user}@#{ssh_host}:#{ssh_port}/"
else
@@ -64,15 +106,27 @@ class Settings < Settingslogic
end
end
+ # FIXME: Deprecated: remove for 4.1
def git_base_path
+ ActiveSupport::Deprecation.warn("Settings.git_base_path is deprecated and will be removed from GitLab 4.1", caller)
+ gitolite.repos_path
+ rescue Settingslogic::MissingSetting
git_host['base_path'] || '/home/git/repositories/'
end
+ # FIXME: Deprecated: remove for 4.1
def git_hooks_path
+ ActiveSupport::Deprecation.warn("Settings.git_hooks_path is deprecated and will be removed from GitLab 4.1", caller)
+ gitolite.hooks_path
+ rescue Settingslogic::MissingSetting
git_host['hooks_path'] || '/home/git/share/gitolite/hooks/'
end
+ # FIXME: Deprecated: remove for 4.1
def git_upload_pack
+ ActiveSupport::Deprecation.warn("Settings.git_upload_pack is deprecated and will be removed from GitLab 4.1", caller)
+ gitolite.upload_pack
+ rescue Settingslogic::MissingSetting
if git_host['upload_pack'] != false
true
else
@@ -80,7 +134,11 @@ class Settings < Settingslogic
end
end
+ # FIXME: Deprecated: remove for 4.1
def git_receive_pack
+ ActiveSupport::Deprecation.warn("Settings.git_receive_pack is deprecated and will be removed from GitLab 4.1", caller)
+ gitolite.receive_pack
+ rescue Settingslogic::MissingSetting
if git_host['receive_pack'] != false
true
else
@@ -88,62 +146,207 @@ class Settings < Settingslogic
end
end
+ # FIXME: Deprecated: remove for 4.1
def git_bin_path
+ ActiveSupport::Deprecation.warn("Settings.git_bin_path is deprecated and will be removed from GitLab 4.1", caller)
+ git.bin_path
+ rescue Settingslogic::MissingSetting
git['path'] || '/usr/bin/git'
end
+ # FIXME: Deprecated: remove for 4.1
def git_max_size
+ ActiveSupport::Deprecation.warn("Settings.git_max_size is deprecated and will be removed from GitLab 4.1", caller)
+ git.max_size
+ rescue Settingslogic::MissingSetting
git['git_max_size'] || 5242880 # 5.megabytes
end
+ # FIXME: Deprecated: remove for 4.1
def git_timeout
+ ActiveSupport::Deprecation.warn("Settings.git_timeout is deprecated and will be removed from GitLab 4.1", caller)
+ git.timeout
+ rescue Settingslogic::MissingSetting
git['git_timeout'] || 10
end
+ # FIXME: Deprecated: remove for 4.1
def gitolite_admin_uri
+ ActiveSupport::Deprecation.warn("Settings.gitolite_admin_uri is deprecated and will be removed from GitLab 4.1", caller)
+ gitolite.admin_uri
+ rescue Settingslogic::MissingSetting
git_host['admin_uri'] || 'git@localhost:gitolite-admin'
end
+ # FIXME: Deprecated: remove for 4.1
def gitolite_config_file
+ ActiveSupport::Deprecation.warn("Settings.gitolite_config_file is deprecated and will be removed from GitLab 4.1", caller)
+ gitolite.config_file
+ rescue Settingslogic::MissingSetting
git_host['config_file'] || 'gitolite.conf'
end
+ # FIXME: Deprecated: remove for 4.1
def gitolite_admin_key
+ ActiveSupport::Deprecation.warn("Settings.gitolite_admin_key is deprecated and will be removed from GitLab 4.1", caller)
+ gitolite.admin_key
+ rescue Settingslogic::MissingSetting
git_host['gitolite_admin_key'] || 'gitlab'
end
+ # FIXME: Deprecated: remove for 4.1
def default_projects_limit
+ ActiveSupport::Deprecation.warn("Settings.default_projects_limit is deprecated and will be removed from GitLab 4.1", caller)
+ gitlab.default_projects_limit
+ rescue Settingslogic::MissingSetting
app['default_projects_limit'] || 10
end
+ # FIXME: Deprecated: remove for 4.1
def backup_path
- t = app['backup_path'] || "backups/"
- t = /^\//.match(t) ? t : Rails.root .join(t)
- t
+ ActiveSupport::Deprecation.warn("Settings.backup_path is deprecated and will be removed from GitLab 4.1", caller)
+ backup.path
+ rescue Settingslogic::MissingSetting
+ File.expand_path(app['backup_path'] || "backups/", Rails.root)
end
+ # FIXME: Deprecated: remove for 4.1
def backup_keep_time
+ ActiveSupport::Deprecation.warn("Settings.backup_keep_time is deprecated and will be removed from GitLab 4.1", caller)
+ backup.keep_time
+ rescue Settingslogic::MissingSetting
app['backup_keep_time'] || 0
end
+ # FIXME: Deprecated: remove for 4.1
def ldap_enabled?
- ldap && ldap['enabled']
+ ActiveSupport::Deprecation.warn("Settings.ldap_enabled? is deprecated and will be removed from GitLab 4.1", caller)
+ ldap.enabled
rescue Settingslogic::MissingSetting
false
end
+ # FIXME: Deprecated: remove for 4.1
def omniauth_enabled?
- omniauth && omniauth['enabled']
+ ActiveSupport::Deprecation.warn("Settings.omniauth_enabled? is deprecated and will be removed from GitLab 4.1", caller)
+ omniauth.enabled
rescue Settingslogic::MissingSetting
false
end
+ # FIXME: Deprecated: remove for 4.1
def omniauth_providers
- (omniauth_enabled? && omniauth['providers']) || []
+ ActiveSupport::Deprecation.warn("Settings.omniauth_providers is deprecated and will be removed from GitLab 4.1", caller)
+ omniauth.providers
+ rescue Settingslogic::MissingSetting
+ []
end
+ # FIXME: Deprecated: remove for 4.1
def disable_gravatar?
+ ActiveSupport::Deprecation.warn("Settings.disable_gravatar? is deprecated and will be removed from GitLab 4.1", caller)
+ !gravatar.enabled
+ rescue Settingslogic::MissingSetting
app['disable_gravatar'] || false
end
+
+ # FIXME: Deprecated: remove for 4.1
+ def gravatar_url
+ ActiveSupport::Deprecation.warn("Settings.gravatar_url is deprecated and will be removed from GitLab 4.1", caller)
+ gravatar.plain_url
+ rescue Settingslogic::MissingSetting
+ app['gravatar_url'] || 'http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm'
+ end
+
+ # FIXME: Deprecated: remove for 4.1
+ def gravatar_ssl_url
+ ActiveSupport::Deprecation.warn("Settings.gravatar_ssl_url is deprecated and will be removed from GitLab 4.1", caller)
+ gravatar.ssl_url
+ rescue Settingslogic::MissingSetting
+ app['gravatar_ssl_url'] || 'https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm'
+ end
+
+
+
+ def gitlab_on_non_standard_port?
+ ![443, 80].include?(gitlab.port.to_i)
+ end
+
+ private
+
+ def build_gitolite_ssh_path_prefix
+ if gitolite.ssh_port != 22
+ "ssh://#{gitolite.ssh_user}@#{gitolite.ssh_host}:#{gitolite.ssh_port}/"
+ else
+ "#{gitolite.ssh_user}@#{gitolite.ssh_host}:"
+ end
+ end
+
+ def build_gitlab_url
+ if gitlab_on_non_standard_port?
+ custom_port = ":#{gitlab.port}"
+ else
+ custom_port = nil
+ end
+ [ gitlab.protocol,
+ "://",
+ gitlab.host,
+ custom_port
+ ].join('')
+ end
end
end
+
+
+# Default settings
+
+# FIXME: Deprecated: remove for 4.1
+# all Settings.web ...
+# all Settings.app ...
+# all Settings.email ...
+# all Settings.git_host ...
+Settings['pre_40_config'] ||= Settings['web'].present?
+
+Settings['ldap'] ||= Settingslogic.new({})
+Settings.ldap['enabled'] ||= false
+
+Settings['omniauth'] ||= Settingslogic.new({})
+Settings.omniauth['enabled'] ||= false
+Settings.omniauth['providers'] ||= []
+
+Settings['gitlab'] ||= Settingslogic.new({})
+Settings.gitlab['default_projects_limit'] ||= Settings.pre_40_config ? Settings.default_projects_limit : 10
+Settings.gitlab['host'] ||= Settings.pre_40_config ? Settings.web_host : 'localhost'
+Settings.gitlab['https'] ||= Settings.pre_40_config ? Settings.web.https : false
+Settings.gitlab['port'] ||= Settings.gitlab.https ? 443 : 80
+Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http"
+Settings.gitlab['email_from'] ||= Settings.pre_40_config ? Settings.email_from : "gitlab@#{Settings.gitlab.host}"
+Settings.gitlab['url'] ||= Settings.pre_40_config ? Settings.url : Settings.send(:build_gitlab_url)
+
+Settings['gravatar'] ||= Settingslogic.new({})
+Settings.gravatar['enabled'] ||= Settings.pre_40_config ? !Settings.disable_gravatar? : true
+Settings.gravatar['plain_url'] ||= Settings.pre_40_config ? Settings.gravatar_url : 'http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm'
+Settings.gravatar['ssl_url'] ||= Settings.pre_40_config ? Settings.gravatar_ssl_url : 'https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm'
+
+Settings['gitolite'] ||= Settingslogic.new({})
+Settings.gitolite['admin_key'] ||= Settings.pre_40_config ? Settings.gitolite_admin_key : 'gitlab'
+Settings.gitolite['admin_uri'] ||= Settings.pre_40_config ? Settings.gitolite_admin_uri : 'git@localhost:gitolite-admin'
+Settings.gitolite['config_file'] ||= Settings.pre_40_config ? Settings.gitolite_config_file : 'gitolite.conf'
+Settings.gitolite['hooks_path'] ||= Settings.pre_40_config ? Settings.git_hooks_path : '/home/git/share/gitolite/hooks/'
+Settings.gitolite['receive_pack'] ||= Settings.pre_40_config ? Settings.git_receive_pack : (Settings.gitolite['receive_pack'] != false)
+Settings.gitolite['repos_path'] ||= Settings.pre_40_config ? Settings.git_base_path : '/home/git/repositories/'
+Settings.gitolite['upload_pack'] ||= Settings.pre_40_config ? Settings.git_upload_pack : (Settings.gitolite['upload_pack'] != false)
+Settings.gitolite['ssh_host'] ||= Settings.pre_40_config ? Settings.ssh_host : (Settings.gitlab.host || 'localhost')
+Settings.gitolite['ssh_port'] ||= Settings.pre_40_config ? Settings.ssh_port : 22
+Settings.gitolite['ssh_user'] ||= Settings.pre_40_config ? Settings.ssh_user : 'git'
+Settings.gitolite['ssh_path_prefix'] ||= Settings.pre_40_config ? Settings.ssh_path : Settings.send(:build_gitolite_ssh_path_prefix)
+
+Settings['backup'] ||= Settingslogic.new({})
+Settings.backup['keep_time'] ||= Settings.pre_40_config ? Settings.backup_keep_time : 0
+Settings.backup['path'] = Settings.pre_40_config ? Settings.backup_path : File.expand_path(Settings.backup['path'] || "tmp/backups/", Rails.root)
+
+Settings['git'] ||= Settingslogic.new({})
+Settings.git['max_size'] ||= Settings.pre_40_config ? Settings.git_max_size : 5242880 # 5.megabytes
+Settings.git['bin_path'] ||= Settings.pre_40_config ? Settings.git_bin_path : '/usr/bin/git'
+Settings.git['timeout'] ||= Settings.pre_40_config ? Settings.git_timeout : 10
+Settings.git['path'] ||= Settings.git.bin_path # FIXME: Deprecated: remove for 4.1
diff --git a/config/initializers/3_grit_ext.rb b/config/initializers/3_grit_ext.rb
index d114ea6cc8b..097c301a06a 100644
--- a/config/initializers/3_grit_ext.rb
+++ b/config/initializers/3_grit_ext.rb
@@ -1,8 +1,8 @@
require 'grit'
require 'pygments'
-Grit::Git.git_timeout = Gitlab.config.git_timeout
-Grit::Git.git_max_size = Gitlab.config.git_max_size
+Grit::Git.git_timeout = Gitlab.config.git.timeout
+Grit::Git.git_max_size = Gitlab.config.git.max_size
Grit::Blob.class_eval do
include Linguist::BlobHelper
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 8f3cef5a2ac..ed3ab71862a 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -4,7 +4,7 @@ Devise.setup do |config|
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
- config.mailer_sender = Gitlab.config.email_from
+ config.mailer_sender = Gitlab.config.gitlab.email_from
# Configure the class responsible to send e-mails.
# config.mailer = "Devise::Mailer"
@@ -205,20 +205,18 @@ Devise.setup do |config|
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
# end
- gl = Gitlab.config
-
- if gl.ldap_enabled?
+ if Gitlab.config.ldap.enabled
config.omniauth :ldap,
- :host => gl.ldap['host'],
- :base => gl.ldap['base'],
- :uid => gl.ldap['uid'],
- :port => gl.ldap['port'],
- :method => gl.ldap['method'],
- :bind_dn => gl.ldap['bind_dn'],
- :password => gl.ldap['password']
+ :host => Gitlab.config.ldap['host'],
+ :base => Gitlab.config.ldap['base'],
+ :uid => Gitlab.config.ldap['uid'],
+ :port => Gitlab.config.ldap['port'],
+ :method => Gitlab.config.ldap['method'],
+ :bind_dn => Gitlab.config.ldap['bind_dn'],
+ :password => Gitlab.config.ldap['password']
end
- gl.omniauth_providers.each do |gl_provider|
- config.omniauth gl_provider['name'].to_sym, gl_provider['app_id'], gl_provider['app_secret']
+ Gitlab.config.omniauth.providers.each do |provider|
+ config.omniauth provider['name'].to_sym, provider['app_id'], provider['app_secret']
end
end
diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml
index a78cb6b670b..3b763cf410d 100644
--- a/config/locales/devise.en.yml
+++ b/config/locales/devise.en.yml
@@ -14,7 +14,7 @@ en:
devise:
failure:
already_authenticated: 'You are already signed in.'
- unauthenticated: 'You need to sign in or sign up before continuing.'
+ unauthenticated: 'You need to sign in before continuing.'
unconfirmed: 'You have to confirm your account before continuing.'
locked: 'Your account is locked.'
invalid: 'Invalid email or password.'
diff --git a/config/routes.rb b/config/routes.rb
index f1527977c09..e08bfebc020 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -14,10 +14,10 @@ Gitlab::Application.routes.draw do
# Enable Grack support
mount Grack::Bundle.new({
- git_path: Gitlab.config.git_bin_path,
- project_root: Gitlab.config.git_base_path,
- upload_pack: Gitlab.config.git_upload_pack,
- receive_pack: Gitlab.config.git_receive_pack
+ git_path: Gitlab.config.git.bin_path,
+ project_root: Gitlab.config.gitolite.repos_path,
+ upload_pack: Gitlab.config.gitolite.upload_pack,
+ receive_pack: Gitlab.config.gitolite.receive_pack
}), at: '/:path', constraints: { path: /[-\/\w\.-]+\.git/ }
#
@@ -164,11 +164,12 @@ Gitlab::Application.routes.draw do
end
end
- resources :merge_requests, constraints: {id: /\d+/} do
+ resources :merge_requests, constraints: {id: /\d+/}, except: [:destroy] do
member do
get :diffs
get :automerge
get :automerge_check
+ get :ci_status
end
collection do
@@ -199,9 +200,9 @@ Gitlab::Application.routes.draw do
:via => [:get, :post], constraints: {from: /.+/, to: /.+/}
resources :team, controller: 'team_members', only: [:index]
- resources :milestones
+ resources :milestones, except: [:destroy]
resources :labels, only: [:index]
- resources :issues do
+ resources :issues, except: [:destroy] do
collection do
post :sort
post :bulk_update