diff options
-rw-r--r-- | config/routes.rb | 7 | ||||
-rw-r--r-- | db/post_migrate/20180816193530_rename_login_root_namespaces.rb | 16 | ||||
-rw-r--r-- | db/schema.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/path_regex.rb | 1 |
4 files changed, 25 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb index d16a587c5ee..e2e97b46d23 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -27,6 +27,13 @@ Rails.application.routes.draw do authorizations: 'oauth/authorizations' end + # This is here so we can "reserve" the path for the Jira integration in GitLab EE + # Having a non-existent controller here does not affect the scope in any way since all possible routes + # get a 404 proc returned. It is written in this way to minimize merge conflicts with EE + scope path: '/login/oauth', controller: 'oauth/jira/authorizations', as: :oauth_jira do + match ':action', via: [:get, :post], to: proc { [404, {}, ['']] } + end + use_doorkeeper_openid_connect # Autocomplete diff --git a/db/post_migrate/20180816193530_rename_login_root_namespaces.rb b/db/post_migrate/20180816193530_rename_login_root_namespaces.rb new file mode 100644 index 00000000000..60cec24eed6 --- /dev/null +++ b/db/post_migrate/20180816193530_rename_login_root_namespaces.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true +class RenameLoginRootNamespaces < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + include Gitlab::Database::RenameReservedPathsMigration::V1 + + DOWNTIME = false + + # We're taking over the /login namespace as part of a fix for the Jira integration + def up + rename_root_paths 'login' + end + + def down + revert_renames + end +end diff --git a/db/schema.rb b/db/schema.rb index 9dc122b54b3..6168a1be29e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180809195358) do +ActiveRecord::Schema.define(version: 20180816193530) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/lib/gitlab/path_regex.rb b/lib/gitlab/path_regex.rb index 61653044433..359dd2bcbc7 100644 --- a/lib/gitlab/path_regex.rb +++ b/lib/gitlab/path_regex.rb @@ -40,6 +40,7 @@ module Gitlab invites jwt koding + login notification_settings oauth profile |