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