summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-07-25 11:27:58 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-07-25 11:27:58 +0000
commit2a067bb37cdd4b00abf742c4e221397ee86dcf0c (patch)
tree5d69fb595752c8a29563747a13ef28b9b057d188
parentbd13978c71a2bcc803135c0c0a0f1e5cd3e70c18 (diff)
parente4391c7190fcebd37e49db447b22b1081dca9741 (diff)
downloadgitlab-ce-2a067bb37cdd4b00abf742c4e221397ee86dcf0c.tar.gz
Merge branch 'backport-ee-2328' into 'master'
Backport changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2328 See merge request !13022
-rw-r--r--app/controllers/admin/application_settings_controller.rb4
-rw-r--r--app/controllers/projects/application_controller.rb1
-rw-r--r--app/controllers/projects_controller.rb4
3 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb
index c1bc4c0d675..4c0f7556894 100644
--- a/app/controllers/admin/application_settings_controller.rb
+++ b/app/controllers/admin/application_settings_controller.rb
@@ -76,11 +76,11 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
params.delete(:domain_blacklist_raw) if params[:domain_blacklist_file]
params.require(:application_setting).permit(
- application_setting_params_ce
+ application_setting_params_attributes
)
end
- def application_setting_params_ce
+ def application_setting_params_attributes
[
:admin_notification_email,
:after_sign_out_path,
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb
index 95de3a44641..221e01b415a 100644
--- a/app/controllers/projects/application_controller.rb
+++ b/app/controllers/projects/application_controller.rb
@@ -22,6 +22,7 @@ class Projects::ApplicationController < ApplicationController
def project
return @project if @project
+ return nil unless params[:project_id] || params[:id]
path = File.join(params[:namespace_id], params[:project_id] || params[:id])
auth_proc = ->(project) { !project.pending_delete? }
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index c769693255c..2d7cbd4614e 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -296,10 +296,10 @@ class ProjectsController < Projects::ApplicationController
def project_params
params.require(:project)
- .permit(project_params_ce)
+ .permit(project_params_attributes)
end
- def project_params_ce
+ def project_params_attributes
[
:avatar,
:build_allow_git_fetch,