diff options
Diffstat (limited to 'app/controllers/projects/settings/ci_cd_controller.rb')
-rw-r--r-- | app/controllers/projects/settings/ci_cd_controller.rb | 10 |
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) |