Commit 917b9fb3 authored by Sean McGivern's avatar Sean McGivern

Add feature categories to controllers beginning with S

parent c649c784
...@@ -25,6 +25,8 @@ class SearchController < ApplicationController ...@@ -25,6 +25,8 @@ class SearchController < ApplicationController
layout 'search' layout 'search'
feature_category :global_search
def show def show
@project = search_service.project @project = search_service.project
@group = search_service.group @group = search_service.group
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class SentNotificationsController < ApplicationController class SentNotificationsController < ApplicationController
skip_before_action :authenticate_user! skip_before_action :authenticate_user!
feature_category :users
def unsubscribe def unsubscribe
@sent_notification = SentNotification.for(params[:id]) @sent_notification = SentNotification.for(params[:id])
......
...@@ -49,6 +49,8 @@ class SessionsController < Devise::SessionsController ...@@ -49,6 +49,8 @@ class SessionsController < Devise::SessionsController
# token mismatch. # token mismatch.
protect_from_forgery with: :exception, prepend: true, except: :destroy protect_from_forgery with: :exception, prepend: true, except: :destroy
feature_category :authentication_and_authorization
CAPTCHA_HEADER = 'X-GitLab-Show-Login-Captcha' CAPTCHA_HEADER = 'X-GitLab-Show-Login-Captcha'
MAX_FAILED_LOGIN_ATTEMPTS = 5 MAX_FAILED_LOGIN_ATTEMPTS = 5
......
...@@ -4,6 +4,8 @@ class Snippets::ApplicationController < ApplicationController ...@@ -4,6 +4,8 @@ class Snippets::ApplicationController < ApplicationController
include FindSnippet include FindSnippet
include SnippetAuthorizations include SnippetAuthorizations
feature_category :snippets
private private
def authorize_read_snippet! def authorize_read_snippet!
......
...@@ -8,6 +8,8 @@ class Snippets::NotesController < ApplicationController ...@@ -8,6 +8,8 @@ class Snippets::NotesController < ApplicationController
before_action :authorize_read_snippet!, only: [:show, :index] before_action :authorize_read_snippet!, only: [:show, :index]
before_action :authorize_create_note!, only: [:create] before_action :authorize_create_note!, only: [:create]
feature_category :snippets
private private
def note def note
......
...@@ -9,6 +9,8 @@ module Security ...@@ -9,6 +9,8 @@ module Security
push_frontend_feature_flag(:instance_security_dashboard, default_enabled: true) push_frontend_feature_flag(:instance_security_dashboard, default_enabled: true)
end end
feature_category :vulnerability_management
protected protected
def check_feature_enabled! def check_feature_enabled!
......
...@@ -9,6 +9,8 @@ class SmartcardController < ApplicationController ...@@ -9,6 +9,8 @@ class SmartcardController < ApplicationController
before_action :check_ngingx_certificate_header, only: :extract_certificate before_action :check_ngingx_certificate_header, only: :extract_certificate
before_action :check_certificate_param, only: :verify_certificate before_action :check_certificate_param, only: :verify_certificate
feature_category :authentication_and_authorization
def auth def auth
redirect_to extract_certificate_smartcard_url(extract_certificate_url_options) redirect_to extract_certificate_smartcard_url(extract_certificate_url_options)
end end
......
...@@ -8,6 +8,8 @@ module Subscriptions ...@@ -8,6 +8,8 @@ module Subscriptions
before_action :find_group before_action :find_group
feature_category :purchase
def edit def edit
end end
......
...@@ -4,6 +4,8 @@ class SubscriptionsController < ApplicationController ...@@ -4,6 +4,8 @@ class SubscriptionsController < ApplicationController
layout 'checkout' layout 'checkout'
skip_before_action :authenticate_user!, only: :new skip_before_action :authenticate_user!, only: :new
feature_category :purchase
content_security_policy do |p| content_security_policy do |p|
next if p.directives.blank? next if p.directives.blank?
......
...@@ -7,6 +7,8 @@ class SurveyResponsesController < ApplicationController ...@@ -7,6 +7,8 @@ class SurveyResponsesController < ApplicationController
skip_before_action :authenticate_user! skip_before_action :authenticate_user!
feature_category :collection
def index def index
track_response if Gitlab.com? track_response if Gitlab.com?
......
...@@ -28,6 +28,7 @@ RSpec.describe "Every controller" do ...@@ -28,6 +28,7 @@ RSpec.describe "Every controller" do
next unless controller.to_s.start_with?('B', 'C', 'D', 'E', 'F', next unless controller.to_s.start_with?('B', 'C', 'D', 'E', 'F',
'H', 'I', 'J', 'K', 'L', 'H', 'I', 'J', 'K', 'L',
'M', 'N', 'O', 'Q', 'R', 'M', 'N', 'O', 'Q', 'R',
'S',
'Projects::MergeRequestsController') 'Projects::MergeRequestsController')
"#{controller}##{action}" "#{controller}##{action}"
......
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