From fe96a1f268558526fd122a348866fbf513ac17e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20=C4=8Cupi=C4=87?= Date: Fri, 12 Jan 2018 22:39:42 +0100 Subject: Stub multiple variable controller method --- config/routes/project.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/routes/project.rb b/config/routes/project.rb index bcaa68c8ce5..8b65240ade4 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -156,7 +156,12 @@ constraints(ProjectUrlConstrainer.new) do end end - resources :variables, only: [:index, :show, :update, :create, :destroy] + resources :variables, only: [:index, :show, :update, :create, :destroy] do + collection do + post :save_multiple + end + end + resources :triggers, only: [:index, :create, :edit, :update, :destroy] do member do post :take_ownership -- cgit v1.2.3 From edbe911b04465f0e6c72e102d083d0e85848a552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20=C4=8Cupi=C4=87?= Date: Tue, 23 Jan 2018 02:09:36 +0100 Subject: Remove redundant routes in VariablesController --- config/routes/project.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/routes/project.rb b/config/routes/project.rb index 8b65240ade4..b8d09f01ae1 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -156,10 +156,8 @@ constraints(ProjectUrlConstrainer.new) do end end - resources :variables, only: [:index, :show, :update, :create, :destroy] do - collection do - post :save_multiple - end + namespace :variables do + post :save_multiple end resources :triggers, only: [:index, :create, :edit, :update, :destroy] do -- cgit v1.2.3 From cc2bed9283039db726f42184ea635f057534205f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20=C4=8Cupi=C4=87?= Date: Tue, 23 Jan 2018 19:24:55 +0100 Subject: Port #save_multiple to Groups::VariablesController --- config/routes/group.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/routes/group.rb b/config/routes/group.rb index 24c76bc55ab..cdf2647415d 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -27,7 +27,11 @@ constraints(GroupUrlConstrainer.new) do resource :ci_cd, only: [:show], controller: 'ci_cd' end - resources :variables, only: [:index, :show, :update, :create, :destroy] + resources :variables, only: [:index, :show, :update, :create, :destroy] do + collection do + post :save_multiple + end + end resources :children, only: [:index] -- cgit v1.2.3 From dcc23530bd1e2bd1600bd523c90c040f84f8c354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20=C4=8Cupi=C4=87?= Date: Tue, 23 Jan 2018 19:34:06 +0100 Subject: Remove redundant routes in Groups::VariablesController --- config/routes/group.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/routes/group.rb b/config/routes/group.rb index cdf2647415d..b3afbb4152f 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -27,10 +27,8 @@ constraints(GroupUrlConstrainer.new) do resource :ci_cd, only: [:show], controller: 'ci_cd' end - resources :variables, only: [:index, :show, :update, :create, :destroy] do - collection do - post :save_multiple - end + namespace :variables do + post :save_multiple end resources :children, only: [:index] -- cgit v1.2.3 From 0bfcdd66bf932c080398ff264323b5c0df17d05c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20=C4=8Cupi=C4=87?= Date: Mon, 29 Jan 2018 18:39:06 +0100 Subject: Use `resource` in Project Variables routing scheme --- config/routes/project.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'config') diff --git a/config/routes/project.rb b/config/routes/project.rb index b8d09f01ae1..1912808f9c0 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -156,9 +156,7 @@ constraints(ProjectUrlConstrainer.new) do end end - namespace :variables do - post :save_multiple - end + resource :variables, only: [:show, :update] resources :triggers, only: [:index, :create, :edit, :update, :destroy] do member do -- cgit v1.2.3 From a8887a0d9c4a41a0707b92189572aeff10566af6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20=C4=8Cupi=C4=87?= Date: Mon, 29 Jan 2018 18:54:16 +0100 Subject: Use `resource` in Group Variables routing scheme --- config/routes/group.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'config') diff --git a/config/routes/group.rb b/config/routes/group.rb index b3afbb4152f..ac22b636372 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -27,9 +27,7 @@ constraints(GroupUrlConstrainer.new) do resource :ci_cd, only: [:show], controller: 'ci_cd' end - namespace :variables do - post :save_multiple - end + resource :variables, only: [:show, :update] resources :children, only: [:index] -- cgit v1.2.3 From cd461400eb2e592c52c1b6ba61771df2fa2913bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20L=C3=B3pez?= Date: Mon, 5 Feb 2018 22:35:34 +0000 Subject: Added ldap config setting to lower case usernames --- config/gitlab.yml.example | 3 +++ config/initializers/1_settings.rb | 1 + 2 files changed, 4 insertions(+) (limited to 'config') diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 33230b9355d..bbc2bcfb0cc 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -370,6 +370,9 @@ production: &base first_name: 'givenName' last_name: 'sn' + # If lowercase_usernames is enabled, GitLab will lower case the username. + lowercase_usernames: false + # GitLab EE only: add more LDAP servers # Choose an ID made of a-z and 0-9 . This ID will be stored in the database # so that GitLab can remember which LDAP server a user belongs to. diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 5ad46d47cb6..28e05bfc18d 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -151,6 +151,7 @@ if Settings.ldap['enabled'] || Rails.env.test? server['allow_username_or_email_login'] = false if server['allow_username_or_email_login'].nil? server['active_directory'] = true if server['active_directory'].nil? server['attributes'] = {} if server['attributes'].nil? + server['lowercase_usernames'] = false if server['lowercase_usernames'].nil? server['provider_name'] ||= "ldap#{key}".downcase server['provider_class'] = OmniAuth::Utils.camelize(server['provider_name']) -- cgit v1.2.3 From 68a419c8792798cfb09730c4ea52ac16e31c3fc9 Mon Sep 17 00:00:00 2001 From: Mayra Cabrera Date: Tue, 6 Feb 2018 00:10:58 +0000 Subject: 31885 - Ability to transfer a single group to another group --- config/routes/group.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/routes/group.rb b/config/routes/group.rb index 24c76bc55ab..b17611d8623 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -14,6 +14,7 @@ constraints(GroupUrlConstrainer.new) do get :merge_requests, as: :merge_requests_group get :projects, as: :projects_group get :activity, as: :activity_group + put :transfer, as: :transfer_group end get '/', action: :show, as: :group_canonical -- cgit v1.2.3 From bed948321173b49564f39837e97212ee4dd96e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D=C3=A1vila?= Date: Wed, 7 Feb 2018 08:00:53 -0500 Subject: Backport of LFS File Locking API --- config/initializers/mime_types.rb | 2 +- config/routes/git_http.rb | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index 5e3e4c966cb..e9326653cbe 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -14,4 +14,4 @@ Mime::Type.register "video/webm", :webm Mime::Type.register "video/ogg", :ogv Mime::Type.unregister :json -Mime::Type.register 'application/json', :json, %w(application/vnd.git-lfs+json application/json) +Mime::Type.register 'application/json', :json, [LfsRequest::CONTENT_TYPE, 'application/json'] diff --git a/config/routes/git_http.rb b/config/routes/git_http.rb index a53c94326d4..ff51823897d 100644 --- a/config/routes/git_http.rb +++ b/config/routes/git_http.rb @@ -16,6 +16,13 @@ scope(path: '*namespace_id/:project_id', get '/*oid', action: :deprecated end + scope(path: 'info/lfs') do + resources :lfs_locks, controller: :lfs_locks_api, path: 'locks' do + post :unlock, on: :member + post :verify, on: :collection + end + end + # GitLab LFS object storage scope(path: 'gitlab-lfs/objects/*oid', controller: :lfs_storage, constraints: { oid: /[a-f0-9]{64}/ }) do get '/', action: :download -- cgit v1.2.3 From 583ef9458c5e5c32a14629f5754bc53ed0ad8a33 Mon Sep 17 00:00:00 2001 From: Hassan Zamani Date: Tue, 30 May 2017 10:36:00 +0430 Subject: Add groups to OpenID Connect claims --- config/initializers/doorkeeper_openid_connect.rb | 1 + config/locales/doorkeeper.en.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/initializers/doorkeeper_openid_connect.rb b/config/initializers/doorkeeper_openid_connect.rb index af174def047..98e1f6e830f 100644 --- a/config/initializers/doorkeeper_openid_connect.rb +++ b/config/initializers/doorkeeper_openid_connect.rb @@ -31,6 +31,7 @@ Doorkeeper::OpenidConnect.configure do o.claim(:website) { |user| user.full_website_url if user.website_url? } o.claim(:profile) { |user| Gitlab::Routing.url_helpers.user_url user } o.claim(:picture) { |user| user.avatar_url(only_path: false) } + o.claim(:groups) { |user| user.membership_groups.map(&:full_path) } end end end diff --git a/config/locales/doorkeeper.en.yml b/config/locales/doorkeeper.en.yml index b1c71095d4f..889111282ef 100644 --- a/config/locales/doorkeeper.en.yml +++ b/config/locales/doorkeeper.en.yml @@ -68,7 +68,7 @@ en: read_user: Read-only access to the user's profile information, like username, public email and full name openid: - The ability to authenticate using GitLab, and read-only access to the user's profile information + The ability to authenticate using GitLab, and read-only access to the user's profile information and group memberships sudo: Access to the Sudo feature, to perform API actions as any user in the system (only available for admins) flash: -- cgit v1.2.3 From 54d88e06907f6ce6620c23b6d80c2fd1131004d5 Mon Sep 17 00:00:00 2001 From: Brett Walker Date: Fri, 9 Feb 2018 18:08:33 +0100 Subject: make sure there is a dependency on Gitlab::CurrentSettings is This fixes an issue where the Rails autoload system would throw various `Unable to autoload constant` errors (such as `Unable to autoload constant EE::ProjectsHelper`) when using the autoload system (such with `spring` or `reload!` in the rails console. This error was specifically ocurring in the EE code, however, it's seems reasonable to place the fix in CE as a general innoculation. --- config/application.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/application.rb b/config/application.rb index 751307de975..9eb6cf4b824 100644 --- a/config/application.rb +++ b/config/application.rb @@ -11,6 +11,7 @@ module Gitlab require_dependency Rails.root.join('lib/gitlab/redis/queues') require_dependency Rails.root.join('lib/gitlab/redis/shared_state') require_dependency Rails.root.join('lib/gitlab/request_context') + require_dependency Rails.root.join('lib/gitlab/current_settings') # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers -- cgit v1.2.3