Commit a3a6f8af authored by Sean McGivern's avatar Sean McGivern

Add feature categories to remaining projects controllers

parent dc6113e6
...@@ -11,6 +11,8 @@ class Projects::UploadsController < Projects::ApplicationController ...@@ -11,6 +11,8 @@ class Projects::UploadsController < Projects::ApplicationController
before_action :authorize_upload_file!, only: [:create, :authorize] before_action :authorize_upload_file!, only: [:create, :authorize]
before_action :verify_workhorse_api!, only: [:authorize] before_action :verify_workhorse_api!, only: [:authorize]
feature_category :not_owned
private private
def upload_model_class def upload_model_class
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Projects::UsagePingController < Projects::ApplicationController class Projects::UsagePingController < Projects::ApplicationController
before_action :authenticate_user! before_action :authenticate_user!
feature_category :collection
def web_ide_clientside_preview def web_ide_clientside_preview
return render_404 unless Gitlab::CurrentSettings.web_ide_clientside_preview_enabled? return render_404 unless Gitlab::CurrentSettings.web_ide_clientside_preview_enabled?
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Projects::VariablesController < Projects::ApplicationController class Projects::VariablesController < Projects::ApplicationController
before_action :authorize_admin_build! before_action :authorize_admin_build!
feature_category :continuous_integration
def show def show
respond_to do |format| respond_to do |format|
format.json do format.json do
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Projects::WebIdeSchemasController < Projects::ApplicationController class Projects::WebIdeSchemasController < Projects::ApplicationController
before_action :authenticate_user! before_action :authenticate_user!
feature_category :web_ide
def show def show
return respond_422 unless branch_sha return respond_422 unless branch_sha
......
...@@ -8,6 +8,8 @@ class Projects::WebIdeTerminalsController < Projects::ApplicationController ...@@ -8,6 +8,8 @@ class Projects::WebIdeTerminalsController < Projects::ApplicationController
before_action :authorize_read_web_ide_terminal!, except: [:check_config, :create] before_action :authorize_read_web_ide_terminal!, except: [:check_config, :create]
before_action :authorize_update_web_ide_terminal!, only: [:cancel, :retry] before_action :authorize_update_web_ide_terminal!, only: [:cancel, :retry]
feature_category :web_ide
def check_config def check_config
return respond_422 unless branch_sha return respond_422 unless branch_sha
......
...@@ -5,6 +5,8 @@ class Projects::WikisController < Projects::ApplicationController ...@@ -5,6 +5,8 @@ class Projects::WikisController < Projects::ApplicationController
alias_method :container, :project alias_method :container, :project
feature_category :wiki
def git_access def git_access
end end
end end
...@@ -11,6 +11,8 @@ class Projects::VulnerabilityFeedbackController < Projects::ApplicationControlle ...@@ -11,6 +11,8 @@ class Projects::VulnerabilityFeedbackController < Projects::ApplicationControlle
respond_to :json respond_to :json
feature_category :vulnerability_management
def index def index
# TODO: Move to finder or list service # TODO: Move to finder or list service
@vulnerability_feedback = @project.vulnerability_feedback.with_associations @vulnerability_feedback = @project.vulnerability_feedback.with_associations
......
...@@ -23,17 +23,8 @@ RSpec.describe "Every controller" do ...@@ -23,17 +23,8 @@ RSpec.describe "Every controller" do
let_it_be(:routes_without_category) do let_it_be(:routes_without_category) do
controller_actions.map do |controller, action| controller_actions.map do |controller, action|
child_controller = controller.to_s.split('::').second
next if controller.feature_category_for_action(action) next if controller.feature_category_for_action(action)
next if controller.to_s.start_with?('P') &&
!child_controller.to_s.start_with?('A', 'B', 'C', 'D',
'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L',
'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T')
"#{controller}##{action}" "#{controller}##{action}"
end.compact end.compact
end end
......
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