diff options
Diffstat (limited to 'app/controllers/projects')
6 files changed, 13 insertions, 23 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 3bb00978aac..0080ae1a5be 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -31,9 +31,7 @@ class Projects::BlobController < Projects::ApplicationController before_action :editor_variables, except: [:show, :preview, :diff] before_action :validate_diff_params, only: :diff before_action :set_last_commit_sha, only: [:edit, :update] - before_action only: :new do - record_experiment_user(:ci_syntax_templates, namespace_id: @project.namespace_id) if params[:file_name] == @project.ci_config_path_or_default - end + before_action :record_experiment, only: :new track_redis_hll_event :create, :update, name: 'g_edit_by_sfe' @@ -263,4 +261,10 @@ class Projects::BlobController < Projects::ApplicationController def visitor_id current_user&.id end + + def record_experiment + return unless params[:file_name] == @project.ci_config_path_or_default && @project.namespace.recent? + + record_experiment_user(:ci_syntax_templates_b, namespace_id: @project.namespace_id) + end end diff --git a/app/controllers/projects/ci/pipeline_editor_controller.rb b/app/controllers/projects/ci/pipeline_editor_controller.rb index 3552915b561..79e4ec375b7 100644 --- a/app/controllers/projects/ci/pipeline_editor_controller.rb +++ b/app/controllers/projects/ci/pipeline_editor_controller.rb @@ -5,6 +5,7 @@ class Projects::Ci::PipelineEditorController < Projects::ApplicationController before_action do push_frontend_feature_flag(:ci_config_visualization_tab, @project, default_enabled: :yaml) push_frontend_feature_flag(:ci_config_merged_tab, @project, default_enabled: :yaml) + push_frontend_feature_flag(:pipeline_status_for_pipeline_editor, @project, default_enabled: :yaml) end feature_category :pipeline_authoring diff --git a/app/controllers/projects/notes_controller.rb b/app/controllers/projects/notes_controller.rb index 71a93701dc4..77fd7688caf 100644 --- a/app/controllers/projects/notes_controller.rb +++ b/app/controllers/projects/notes_controller.rb @@ -10,7 +10,6 @@ class Projects::NotesController < Projects::ApplicationController before_action :authorize_read_note! before_action :authorize_create_note!, only: [:create] before_action :authorize_resolve_note!, only: [:resolve, :unresolve] - before_action :create_rate_limit, only: [:create] feature_category :issue_tracking @@ -91,20 +90,4 @@ class Projects::NotesController < Projects::ApplicationController def whitelist_query_limiting Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-foss/issues/42383') end - - def create_rate_limit - key = :notes_create - return unless rate_limiter.throttled?(key, scope: [current_user], users_allowlist: rate_limit_users_allowlist) - - rate_limiter.log_request(request, "#{key}_request_limit".to_sym, current_user) - render plain: _('This endpoint has been requested too many times. Try again later.'), status: :too_many_requests - end - - def rate_limiter - ::Gitlab::ApplicationRateLimiter - end - - def rate_limit_users_allowlist - Gitlab::CurrentSettings.current_application_settings.notes_create_limit_allowlist - end end diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 59b14bbb91d..aa1c6ab7550 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -13,8 +13,8 @@ class Projects::PipelinesController < Projects::ApplicationController before_action :authorize_create_pipeline!, only: [:new, :create, :config_variables] before_action :authorize_update_pipeline!, only: [:retry, :cancel] before_action do - push_frontend_feature_flag(:pipelines_security_report_summary, project) - push_frontend_feature_flag(:new_pipeline_form, project, default_enabled: true) + push_frontend_feature_flag(:pipelines_security_report_summary, project, default_enabled: :yaml) + push_frontend_feature_flag(:new_pipeline_form, project, default_enabled: :yaml) push_frontend_feature_flag(:graphql_pipeline_details, project, type: :development, default_enabled: :yaml) push_frontend_feature_flag(:graphql_pipeline_details_users, current_user, type: :development, default_enabled: :yaml) push_frontend_feature_flag(:ci_mini_pipeline_gl_dropdown, project, type: :development, default_enabled: :yaml) diff --git a/app/controllers/projects/security/configuration_controller.rb b/app/controllers/projects/security/configuration_controller.rb index 9366ca7b0ed..cafc392134b 100644 --- a/app/controllers/projects/security/configuration_controller.rb +++ b/app/controllers/projects/security/configuration_controller.rb @@ -3,6 +3,8 @@ module Projects module Security class ConfigurationController < Projects::ApplicationController + include SecurityAndCompliancePermissions + feature_category :static_application_security_testing def show diff --git a/app/controllers/projects/templates_controller.rb b/app/controllers/projects/templates_controller.rb index ab05c9694fd..b4b8fb97049 100644 --- a/app/controllers/projects/templates_controller.rb +++ b/app/controllers/projects/templates_controller.rb @@ -25,7 +25,7 @@ class Projects::TemplatesController < Projects::ApplicationController def names respond_to do |format| - format.json { render json: TemplateFinder.all_template_names_array(project, params[:template_type].to_s.pluralize) } + format.json { render json: TemplateFinder.all_template_names_hash_or_array(project, params[:template_type].to_s) } end end |