Commit dc6113e6 authored by Sean McGivern's avatar Sean McGivern

Add feature categories to ProjectsController::[Q-T]*

Danger wants a commit body, but there's really not any more to say.
These are all best effort and not guaranteed to be 100% accurate.
parent 65b889b3
...@@ -15,6 +15,8 @@ class Projects::RawController < Projects::ApplicationController ...@@ -15,6 +15,8 @@ class Projects::RawController < Projects::ApplicationController
before_action :no_cache_headers, only: [:show] before_action :no_cache_headers, only: [:show]
before_action :redirect_to_external_storage, only: :show, if: :static_objects_external_storage_enabled? before_action :redirect_to_external_storage, only: :show, if: :static_objects_external_storage_enabled?
feature_category :source_code_management
def show def show
@blob = @repository.blob_at(@commit.id, @path) @blob = @repository.blob_at(@commit.id, @path)
......
...@@ -11,6 +11,8 @@ class Projects::RefsController < Projects::ApplicationController ...@@ -11,6 +11,8 @@ class Projects::RefsController < Projects::ApplicationController
before_action :assign_ref_vars before_action :assign_ref_vars
before_action :authorize_download_code! before_action :authorize_download_code!
feature_category :source_code_management
def switch def switch
respond_to do |format| respond_to do |format|
format.html do format.html do
......
...@@ -8,6 +8,8 @@ module Projects ...@@ -8,6 +8,8 @@ module Projects
before_action :verify_registry_enabled! before_action :verify_registry_enabled!
before_action :authorize_read_container_image! before_action :authorize_read_container_image!
feature_category :container_registry
private private
def verify_registry_enabled! def verify_registry_enabled!
......
...@@ -7,6 +7,8 @@ module Projects ...@@ -7,6 +7,8 @@ module Projects
before_action :release before_action :release
before_action :authorize_read_release_evidence! before_action :authorize_read_release_evidence!
feature_category :release_evidence
def show def show
respond_to do |format| respond_to do |format|
format.json do format.json do
......
...@@ -13,6 +13,8 @@ class Projects::ReleasesController < Projects::ApplicationController ...@@ -13,6 +13,8 @@ class Projects::ReleasesController < Projects::ApplicationController
before_action :authorize_update_release!, only: %i[edit update] before_action :authorize_update_release!, only: %i[edit update]
before_action :authorize_create_release!, only: :new before_action :authorize_create_release!, only: :new
feature_category :release_orchestration
def index def index
respond_to do |format| respond_to do |format|
format.html do format.html do
......
...@@ -18,6 +18,8 @@ class Projects::RepositoriesController < Projects::ApplicationController ...@@ -18,6 +18,8 @@ class Projects::RepositoriesController < Projects::ApplicationController
before_action :authorize_admin_project!, only: :create before_action :authorize_admin_project!, only: :create
before_action :redirect_to_external_storage, only: :archive, if: :static_objects_external_storage_enabled? before_action :redirect_to_external_storage, only: :archive, if: :static_objects_external_storage_enabled?
feature_category :source_code_management
def create def create
@project.create_repository @project.create_repository
......
...@@ -5,6 +5,8 @@ class Projects::RunnerProjectsController < Projects::ApplicationController ...@@ -5,6 +5,8 @@ class Projects::RunnerProjectsController < Projects::ApplicationController
layout 'project_settings' layout 'project_settings'
feature_category :continuous_integration
def create def create
@runner = Ci::Runner.find(params[:runner_project][:runner_id]) @runner = Ci::Runner.find(params[:runner_project][:runner_id])
......
...@@ -6,6 +6,8 @@ class Projects::RunnersController < Projects::ApplicationController ...@@ -6,6 +6,8 @@ class Projects::RunnersController < Projects::ApplicationController
layout 'project_settings' layout 'project_settings'
feature_category :continuous_integration
def index def index
redirect_to project_settings_ci_cd_path(@project, anchor: 'js-runners-settings') redirect_to project_settings_ci_cd_path(@project, anchor: 'js-runners-settings')
end end
......
...@@ -5,6 +5,8 @@ module Projects ...@@ -5,6 +5,8 @@ module Projects
class FunctionsController < Projects::ApplicationController class FunctionsController < Projects::ApplicationController
before_action :authorize_read_cluster! before_action :authorize_read_cluster!
feature_category :serverless
def index def index
respond_to do |format| respond_to do |format|
format.json do format.json do
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Projects::ServiceDeskController < Projects::ApplicationController class Projects::ServiceDeskController < Projects::ApplicationController
before_action :authorize_admin_project! before_action :authorize_admin_project!
feature_category :service_desk
def show def show
json_response json_response
end end
......
...@@ -19,6 +19,8 @@ class Projects::ServicesController < Projects::ApplicationController ...@@ -19,6 +19,8 @@ class Projects::ServicesController < Projects::ApplicationController
layout "project_settings" layout "project_settings"
feature_category :integrations
def edit def edit
@default_integration = Service.default_integration(service.type, project) @default_integration = Service.default_integration(service.type, project)
end end
......
...@@ -7,6 +7,8 @@ module Projects ...@@ -7,6 +7,8 @@ module Projects
before_action :check_feature_availability before_action :check_feature_availability
feature_category :authentication_and_authorization
def index def index
@project_access_token = PersonalAccessToken.new @project_access_token = PersonalAccessToken.new
set_index_vars set_index_vars
......
...@@ -14,6 +14,8 @@ module Projects ...@@ -14,6 +14,8 @@ module Projects
helper_method :highlight_badge helper_method :highlight_badge
feature_category :continuous_integration
def show def show
if Feature.enabled?(:ci_pipeline_triggers_settings_vue_ui, @project) if Feature.enabled?(:ci_pipeline_triggers_settings_vue_ui, @project)
@triggers_json = ::Ci::TriggerSerializer.new.represent( @triggers_json = ::Ci::TriggerSerializer.new.represent(
......
...@@ -6,6 +6,8 @@ module Projects ...@@ -6,6 +6,8 @@ module Projects
before_action :authorize_admin_project! before_action :authorize_admin_project!
layout "project_settings" layout "project_settings"
feature_category :integrations
def show def show
@services = @project.find_or_initialize_services @services = @project.find_or_initialize_services
end end
......
...@@ -11,6 +11,8 @@ module Projects ...@@ -11,6 +11,8 @@ module Projects
helper_method :error_tracking_setting helper_method :error_tracking_setting
helper_method :tracing_setting helper_method :tracing_setting
feature_category :incident_management
def update def update
result = ::Projects::Operations::UpdateService.new(project, current_user, update_params).execute result = ::Projects::Operations::UpdateService.new(project, current_user, update_params).execute
......
...@@ -10,6 +10,9 @@ module Projects ...@@ -10,6 +10,9 @@ module Projects
push_frontend_feature_flag(:deploy_keys_on_protected_branches, @project) push_frontend_feature_flag(:deploy_keys_on_protected_branches, @project)
end end
feature_category :source_code_management, [:show, :cleanup]
feature_category :continuous_delivery, [:create_deploy_token]
def show def show
render_show render_show
end end
......
...@@ -4,6 +4,8 @@ class Projects::Snippets::ApplicationController < Projects::ApplicationControlle ...@@ -4,6 +4,8 @@ class Projects::Snippets::ApplicationController < Projects::ApplicationControlle
include FindSnippet include FindSnippet
include SnippetAuthorizations include SnippetAuthorizations
feature_category :snippets
private private
# This overrides the default snippet create authorization # This overrides the default snippet create authorization
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Projects::StarrersController < Projects::ApplicationController class Projects::StarrersController < Projects::ApplicationController
include SortingHelper include SortingHelper
feature_category :projects
def index def index
@starrers = UsersStarProjectsFinder.new(@project, params, current_user: @current_user).execute @starrers = UsersStarProjectsFinder.new(@project, params, current_user: @current_user).execute
@sort = params[:sort].presence || sort_value_name @sort = params[:sort].presence || sort_value_name
......
...@@ -13,6 +13,8 @@ class Projects::StaticSiteEditorController < Projects::ApplicationController ...@@ -13,6 +13,8 @@ class Projects::StaticSiteEditorController < Projects::ApplicationController
push_frontend_feature_flag(:sse_image_uploads) push_frontend_feature_flag(:sse_image_uploads)
end end
feature_category :static_site_editor
def show def show
service_response = ::StaticSiteEditor::ConfigService.new( service_response = ::StaticSiteEditor::ConfigService.new(
container: project, container: project,
......
...@@ -8,6 +8,8 @@ class Projects::Tags::ReleasesController < Projects::ApplicationController ...@@ -8,6 +8,8 @@ class Projects::Tags::ReleasesController < Projects::ApplicationController
before_action :tag before_action :tag
before_action :release before_action :release
feature_category :release_evidence
def edit def edit
end end
......
...@@ -10,6 +10,9 @@ class Projects::TagsController < Projects::ApplicationController ...@@ -10,6 +10,9 @@ class Projects::TagsController < Projects::ApplicationController
before_action :authorize_download_code! before_action :authorize_download_code!
before_action :authorize_admin_tag!, only: [:new, :create, :destroy] before_action :authorize_admin_tag!, only: [:new, :create, :destroy]
feature_category :source_code_management, [:index, :show, :new, :destroy]
feature_category :release_evidence, [:create]
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def index def index
params[:sort] = params[:sort].presence || sort_value_recently_updated params[:sort] = params[:sort].presence || sort_value_recently_updated
......
...@@ -5,6 +5,8 @@ class Projects::TemplatesController < Projects::ApplicationController ...@@ -5,6 +5,8 @@ class Projects::TemplatesController < Projects::ApplicationController
before_action :authorize_can_read_issuable! before_action :authorize_can_read_issuable!
before_action :get_template_class before_action :get_template_class
feature_category :templates
def show def show
template = @template_type.find(params[:key], project) template = @template_type.find(params[:key], project)
......
...@@ -6,6 +6,8 @@ class Projects::TodosController < Projects::ApplicationController ...@@ -6,6 +6,8 @@ class Projects::TodosController < Projects::ApplicationController
before_action :authenticate_user!, only: [:create] before_action :authenticate_user!, only: [:create]
feature_category :issue_tracking
private private
def issuable def issuable
......
...@@ -12,6 +12,8 @@ module Projects ...@@ -12,6 +12,8 @@ module Projects
before_action :authorize_update_environment! before_action :authorize_update_environment!
feature_category :tracing
def show def show
end end
......
...@@ -15,6 +15,8 @@ class Projects::TreeController < Projects::ApplicationController ...@@ -15,6 +15,8 @@ class Projects::TreeController < Projects::ApplicationController
before_action :authorize_download_code! before_action :authorize_download_code!
before_action :authorize_edit_tree!, only: [:create_dir] before_action :authorize_edit_tree!, only: [:create_dir]
feature_category :source_code_management
def show def show
return render_404 unless @commit return render_404 unless @commit
......
...@@ -8,6 +8,8 @@ class Projects::TriggersController < Projects::ApplicationController ...@@ -8,6 +8,8 @@ class Projects::TriggersController < Projects::ApplicationController
layout 'project_settings' layout 'project_settings'
feature_category :continuous_integration
def index def index
redirect_to project_settings_ci_cd_path(@project, anchor: 'js-pipeline-triggers') redirect_to project_settings_ci_cd_path(@project, anchor: 'js-pipeline-triggers')
end end
......
...@@ -12,6 +12,8 @@ class Projects::Quality::TestCasesController < Projects::ApplicationController ...@@ -12,6 +12,8 @@ class Projects::Quality::TestCasesController < Projects::ApplicationController
push_frontend_feature_flag(:quality_test_cases, project) push_frontend_feature_flag(:quality_test_cases, project)
end end
feature_category :quality_management
def index def index
respond_to do |format| respond_to do |format|
format.html format.html
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Projects::RequirementsManagement::RequirementsController < Projects::ApplicationController class Projects::RequirementsManagement::RequirementsController < Projects::ApplicationController
before_action :authorize_read_requirement! before_action :authorize_read_requirement!
feature_category :requirements_management
def index def index
respond_to do |format| respond_to do |format|
format.html format.html
......
...@@ -17,6 +17,8 @@ module Projects ...@@ -17,6 +17,8 @@ module Projects
authorize_modify_auto_fix_setting! authorize_modify_auto_fix_setting!
end end
feature_category :static_application_security_testing
def show def show
@configuration = ConfigurationPresenter.new(project, @configuration = ConfigurationPresenter.new(project,
auto_fix_permission: auto_fix_authorized?, auto_fix_permission: auto_fix_authorized?,
......
...@@ -10,6 +10,8 @@ module Projects ...@@ -10,6 +10,8 @@ module Projects
before_action only: [:index] do before_action only: [:index] do
push_frontend_feature_flag(:security_auto_fix, project, default_enabled: false) push_frontend_feature_flag(:security_auto_fix, project, default_enabled: false)
end end
feature_category :static_application_security_testing
end end
end end
end end
...@@ -5,6 +5,8 @@ module Projects ...@@ -5,6 +5,8 @@ module Projects
class DastProfilesController < Projects::ApplicationController class DastProfilesController < Projects::ApplicationController
before_action :authorize_read_on_demand_scans! before_action :authorize_read_on_demand_scans!
feature_category :dynamic_application_security_testing
def show def show
end end
end end
......
...@@ -5,6 +5,8 @@ module Projects ...@@ -5,6 +5,8 @@ module Projects
class DastScannerProfilesController < Projects::ApplicationController class DastScannerProfilesController < Projects::ApplicationController
before_action :authorize_read_on_demand_scans! before_action :authorize_read_on_demand_scans!
feature_category :dynamic_application_security_testing
def new def new
end end
......
...@@ -8,6 +8,8 @@ module Projects ...@@ -8,6 +8,8 @@ module Projects
push_frontend_feature_flag(:security_on_demand_scans_site_validation, @project) push_frontend_feature_flag(:security_on_demand_scans_site_validation, @project)
end end
feature_category :dynamic_application_security_testing
def new def new
end end
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
module Projects module Projects
module Security module Security
class DiscoverController < Projects::ApplicationController class DiscoverController < Projects::ApplicationController
feature_category :navigation
def show def show
render_404 unless helpers.show_discover_project_security?(@project) render_404 unless helpers.show_discover_project_security?(@project)
end end
......
...@@ -8,6 +8,8 @@ module Projects ...@@ -8,6 +8,8 @@ module Projects
before_action :authorize_read_threat_monitoring! before_action :authorize_read_threat_monitoring!
before_action :set_polling_interval, only: [:summary] before_action :set_polling_interval, only: [:summary]
feature_category :container_network_security
def summary def summary
return not_found unless environment.has_metrics? return not_found unless environment.has_metrics?
......
...@@ -11,6 +11,8 @@ module Projects ...@@ -11,6 +11,8 @@ module Projects
before_action :ensure_sast_configuration_enabled!, except: [:create] before_action :ensure_sast_configuration_enabled!, except: [:create]
before_action :authorize_edit_tree!, only: [:create] before_action :authorize_edit_tree!, only: [:create]
feature_category :static_application_security_testing
def show def show
end end
......
...@@ -6,6 +6,8 @@ module Projects ...@@ -6,6 +6,8 @@ module Projects
before_action :authorize_read_vulnerability! before_action :authorize_read_vulnerability!
before_action :scanned_resources before_action :scanned_resources
feature_category :dynamic_application_security_testing
def index def index
respond_to do |format| respond_to do |format|
format.csv do format.csv do
......
...@@ -13,6 +13,8 @@ module Projects ...@@ -13,6 +13,8 @@ module Projects
before_action :authorize_create_note!, only: [:create] before_action :authorize_create_note!, only: [:create]
feature_category :vulnerability_management
private private
alias_method :vulnerable, :project alias_method :vulnerable, :project
......
...@@ -11,6 +11,8 @@ module Projects ...@@ -11,6 +11,8 @@ module Projects
alias_method :vulnerable, :project alias_method :vulnerable, :project
feature_category :vulnerability_management
def show def show
pipeline = vulnerability.finding.pipelines.first pipeline = vulnerability.finding.pipelines.first
@pipeline = pipeline if Ability.allowed?(current_user, :read_pipeline, pipeline) @pipeline = pipeline if Ability.allowed?(current_user, :read_pipeline, pipeline)
......
...@@ -8,6 +8,8 @@ module Projects ...@@ -8,6 +8,8 @@ module Projects
before_action :authorize_read_waf_anomalies! before_action :authorize_read_waf_anomalies!
before_action :set_polling_interval before_action :set_polling_interval
feature_category :web_firewall
def summary def summary
return not_found unless anomaly_summary_service.elasticsearch_client return not_found unless anomaly_summary_service.elasticsearch_client
......
...@@ -11,6 +11,8 @@ module Projects ...@@ -11,6 +11,8 @@ module Projects
layout 'project_settings' layout 'project_settings'
feature_category :integrations
def slack_auth def slack_auth
result = Projects::SlackApplicationInstallService.new(project, current_user, params).execute result = Projects::SlackApplicationInstallService.new(project, current_user, params).execute
......
...@@ -7,6 +7,8 @@ class Projects::SubscriptionsController < Projects::ApplicationController ...@@ -7,6 +7,8 @@ class Projects::SubscriptionsController < Projects::ApplicationController
before_action :feature_ci_project_subscriptions! before_action :feature_ci_project_subscriptions!
before_action :authorize_upstream_project!, only: [:create] before_action :authorize_upstream_project!, only: [:create]
feature_category :continuous_integration
def create def create
subscription = project.upstream_project_subscriptions.create(upstream_project: upstream_project) subscription = project.upstream_project_subscriptions.create(upstream_project: upstream_project)
......
...@@ -4,6 +4,8 @@ module Projects ...@@ -4,6 +4,8 @@ module Projects
class ThreatMonitoringController < Projects::ApplicationController class ThreatMonitoringController < Projects::ApplicationController
before_action :authorize_read_threat_monitoring! before_action :authorize_read_threat_monitoring!
feature_category :web_firewall
def edit def edit
@environment = project.environments.find(params[:environment_id]) @environment = project.environments.find(params[:environment_id])
@policy_name = params[:id] @policy_name = params[:id]
......
...@@ -31,7 +31,8 @@ RSpec.describe "Every controller" do ...@@ -31,7 +31,8 @@ RSpec.describe "Every controller" do
!child_controller.to_s.start_with?('A', 'B', 'C', 'D', !child_controller.to_s.start_with?('A', 'B', 'C', 'D',
'E', 'F', 'G', 'H', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'I', 'J', 'K', 'L',
'M', 'N', 'O', 'P') 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T')
"#{controller}##{action}" "#{controller}##{action}"
end.compact end.compact
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment