Commit 73399b6e authored by Sean McGivern's avatar Sean McGivern

Add feature categories to controllers beginning with P

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 3a98d7a0
...@@ -7,6 +7,8 @@ class PasswordsController < Devise::PasswordsController ...@@ -7,6 +7,8 @@ class PasswordsController < Devise::PasswordsController
before_action :check_password_authentication_available, only: [:create] before_action :check_password_authentication_available, only: [:create]
before_action :throttle_reset, only: [:create] before_action :throttle_reset, only: [:create]
feature_category :authentication_and_authorization
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def edit def edit
super super
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Profiles::AccountsController < Profiles::ApplicationController class Profiles::AccountsController < Profiles::ApplicationController
include AuthHelper include AuthHelper
feature_category :users
def show def show
render(locals: show_view_variables) render(locals: show_view_variables)
end end
......
# frozen_string_literal: true # frozen_string_literal: true
class Profiles::ActiveSessionsController < Profiles::ApplicationController class Profiles::ActiveSessionsController < Profiles::ApplicationController
feature_category :users
def index def index
@sessions = ActiveSession.list(current_user).reject(&:is_impersonated) @sessions = ActiveSession.list(current_user).reject(&:is_impersonated)
end end
......
# frozen_string_literal: true # frozen_string_literal: true
class Profiles::AvatarsController < Profiles::ApplicationController class Profiles::AvatarsController < Profiles::ApplicationController
feature_category :users
def destroy def destroy
@user = current_user @user = current_user
......
...@@ -4,6 +4,8 @@ class Profiles::ChatNamesController < Profiles::ApplicationController ...@@ -4,6 +4,8 @@ class Profiles::ChatNamesController < Profiles::ApplicationController
before_action :chat_name_token, only: [:new] before_action :chat_name_token, only: [:new]
before_action :chat_name_params, only: [:new, :create, :deny] before_action :chat_name_params, only: [:new, :create, :deny]
feature_category :users
def index def index
@chat_names = current_user.chat_names @chat_names = current_user.chat_names
end end
......
...@@ -5,6 +5,8 @@ class Profiles::EmailsController < Profiles::ApplicationController ...@@ -5,6 +5,8 @@ class Profiles::EmailsController < Profiles::ApplicationController
before_action -> { rate_limit!(:profile_add_new_email) }, only: [:create] before_action -> { rate_limit!(:profile_add_new_email) }, only: [:create]
before_action -> { rate_limit!(:profile_resend_email_confirmation) }, only: [:resend_confirmation_instructions] before_action -> { rate_limit!(:profile_resend_email_confirmation) }, only: [:resend_confirmation_instructions]
feature_category :users
def index def index
@primary_email = current_user.email @primary_email = current_user.email
@emails = current_user.emails.order_id_desc @emails = current_user.emails.order_id_desc
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Profiles::GpgKeysController < Profiles::ApplicationController class Profiles::GpgKeysController < Profiles::ApplicationController
before_action :set_gpg_key, only: [:destroy, :revoke] before_action :set_gpg_key, only: [:destroy, :revoke]
feature_category :users
def index def index
@gpg_keys = current_user.gpg_keys.with_subkeys @gpg_keys = current_user.gpg_keys.with_subkeys
@gpg_key = GpgKey.new @gpg_key = GpgKey.new
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Profiles::GroupsController < Profiles::ApplicationController class Profiles::GroupsController < Profiles::ApplicationController
include RoutableActions include RoutableActions
feature_category :users
def update def update
group = find_routable!(Group, params[:id]) group = find_routable!(Group, params[:id])
notification_setting = current_user.notification_settings_for(group) notification_setting = current_user.notification_settings_for(group)
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Profiles::KeysController < Profiles::ApplicationController class Profiles::KeysController < Profiles::ApplicationController
skip_before_action :authenticate_user!, only: [:get_keys] skip_before_action :authenticate_user!, only: [:get_keys]
feature_category :users
def index def index
@keys = current_user.keys.order_id_desc @keys = current_user.keys.order_id_desc
@key = Key.new @key = Key.new
......
# frozen_string_literal: true # frozen_string_literal: true
class Profiles::NotificationsController < Profiles::ApplicationController class Profiles::NotificationsController < Profiles::ApplicationController
feature_category :users
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def show def show
@user = current_user @user = current_user
......
...@@ -9,6 +9,8 @@ class Profiles::PasswordsController < Profiles::ApplicationController ...@@ -9,6 +9,8 @@ class Profiles::PasswordsController < Profiles::ApplicationController
layout :determine_layout layout :determine_layout
feature_category :authentication_and_authorization
def new def new
end end
......
# frozen_string_literal: true # frozen_string_literal: true
class Profiles::PersonalAccessTokensController < Profiles::ApplicationController class Profiles::PersonalAccessTokensController < Profiles::ApplicationController
feature_category :authentication_and_authorization
def index def index
set_index_vars set_index_vars
@personal_access_token = finder.build @personal_access_token = finder.build
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Profiles::PreferencesController < Profiles::ApplicationController class Profiles::PreferencesController < Profiles::ApplicationController
before_action :user before_action :user
feature_category :users
def show def show
end end
......
...@@ -6,6 +6,8 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController ...@@ -6,6 +6,8 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
push_frontend_feature_flag(:webauthn) push_frontend_feature_flag(:webauthn)
end end
feature_category :authentication_and_authorization
def show def show
unless current_user.two_factor_enabled? unless current_user.two_factor_enabled?
current_user.otp_secret = User.generate_otp_secret(32) current_user.otp_secret = User.generate_otp_secret(32)
......
# frozen_string_literal: true # frozen_string_literal: true
class Profiles::U2fRegistrationsController < Profiles::ApplicationController class Profiles::U2fRegistrationsController < Profiles::ApplicationController
feature_category :authentication_and_authorization
def destroy def destroy
u2f_registration = current_user.u2f_registrations.find(params[:id]) u2f_registration = current_user.u2f_registrations.find(params[:id])
u2f_registration.destroy u2f_registration.destroy
......
# frozen_string_literal: true # frozen_string_literal: true
class Profiles::WebauthnRegistrationsController < Profiles::ApplicationController class Profiles::WebauthnRegistrationsController < Profiles::ApplicationController
feature_category :authentication_and_authorization
def destroy def destroy
webauthn_registration = current_user.webauthn_registrations.find(params[:id]) webauthn_registration = current_user.webauthn_registrations.find(params[:id])
webauthn_registration.destroy webauthn_registration.destroy
......
...@@ -10,6 +10,8 @@ class ProfilesController < Profiles::ApplicationController ...@@ -10,6 +10,8 @@ class ProfilesController < Profiles::ApplicationController
push_frontend_feature_flag(:webauthn) push_frontend_feature_flag(:webauthn)
end end
feature_category :users
def show def show
end end
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Profiles::BillingsController < Profiles::ApplicationController class Profiles::BillingsController < Profiles::ApplicationController
before_action :verify_namespace_plan_check_enabled before_action :verify_namespace_plan_check_enabled
feature_category :purchase
def index def index
@plans_data = FetchSubscriptionPlansService @plans_data = FetchSubscriptionPlansService
.new(plan: current_user.namespace.plan_name_for_upgrading) .new(plan: current_user.namespace.plan_name_for_upgrading)
......
...@@ -7,6 +7,8 @@ class Profiles::SlacksController < Profiles::ApplicationController ...@@ -7,6 +7,8 @@ class Profiles::SlacksController < Profiles::ApplicationController
layout 'application' layout 'application'
feature_category :users
def edit def edit
@projects = disabled_projects if current_user @projects = disabled_projects if current_user
end end
......
...@@ -5,6 +5,8 @@ class Profiles::UsageQuotasController < Profiles::ApplicationController ...@@ -5,6 +5,8 @@ class Profiles::UsageQuotasController < Profiles::ApplicationController
push_frontend_feature_flag(:additional_repo_storage_by_namespace, @group) push_frontend_feature_flag(:additional_repo_storage_by_namespace, @group)
end end
feature_category :purchase
def index def index
@namespace = current_user.namespace @namespace = current_user.namespace
@projects = @namespace.projects.with_shared_runners_limit_enabled.page(params[:page]) @projects = @namespace.projects.with_shared_runners_limit_enabled.page(params[:page])
......
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