summaryrefslogtreecommitdiff
path: root/app/controllers/projects/settings/ci_cd_controller.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-14 15:06:07 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-14 15:06:07 +0000
commit429d1abad29d379d8bc8f5219eb72384ad485deb (patch)
tree5c8f9c96c203dbeb3e3e89f3979ce60453340f3f /app/controllers/projects/settings/ci_cd_controller.rb
parente464f195ff5debc3e9aad0f8c4537404b92019c6 (diff)
downloadgitlab-ce-429d1abad29d379d8bc8f5219eb72384ad485deb.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects/settings/ci_cd_controller.rb')
-rw-r--r--app/controllers/projects/settings/ci_cd_controller.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/projects/settings/ci_cd_controller.rb b/app/controllers/projects/settings/ci_cd_controller.rb
index 0d61c3cc031..cfed8727450 100644
--- a/app/controllers/projects/settings/ci_cd_controller.rb
+++ b/app/controllers/projects/settings/ci_cd_controller.rb
@@ -46,13 +46,19 @@ module Projects
private
def update_params
- params.require(:project).permit(
+ params.require(:project).permit(*permitted_project_params)
+ end
+
+ def permitted_project_params
+ [
:runners_token, :builds_enabled, :build_allow_git_fetch,
:build_timeout_human_readable, :build_coverage_regex, :public_builds,
:auto_cancel_pending_pipelines, :ci_config_path,
auto_devops_attributes: [:id, :domain, :enabled, :deploy_strategy],
ci_cd_settings_attributes: [:default_git_depth]
- )
+ ].tap do |list|
+ list << :max_artifacts_size if can?(current_user, :update_max_artifacts_size, project)
+ end
end
def run_autodevops_pipeline(service)