Merge branch 'frozen-string-app-controller-more' into 'master'
Enable more frozen string in app/controllers/ See merge request gitlab-org/gitlab-ce!21873
This commit is contained in:
commit
cc8424d4e8
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Dashboard::ApplicationController < ApplicationController
|
||||
include ControllerWithCrossProjectAccessCheck
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Dashboard::GroupsController < Dashboard::ApplicationController
|
||||
include GroupTree
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Dashboard::LabelsController < Dashboard::ApplicationController
|
||||
def index
|
||||
respond_to do |format|
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Dashboard::MilestonesController < Dashboard::ApplicationController
|
||||
include MilestoneActions
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Dashboard::ProjectsController < Dashboard::ApplicationController
|
||||
include ParamsBackwardCompatibility
|
||||
include RendersMemberAccess
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Dashboard::SnippetsController < Dashboard::ApplicationController
|
||||
skip_cross_project_access_check :index
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Dashboard::TodosController < Dashboard::ApplicationController
|
||||
include ActionView::Helpers::NumberHelper
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Explore::ApplicationController < ApplicationController
|
||||
skip_before_action :authenticate_user!
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Explore::GroupsController < Explore::ApplicationController
|
||||
include GroupTree
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Explore::ProjectsController < Explore::ApplicationController
|
||||
include ParamsBackwardCompatibility
|
||||
include RendersMemberAccess
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Explore::SnippetsController < Explore::ApplicationController
|
||||
def index
|
||||
@snippets = SnippetsFinder.new(current_user).execute
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module GoogleApi
|
||||
class AuthorizationsController < ApplicationController
|
||||
def callback
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Groups::ApplicationController < ApplicationController
|
||||
include RoutableActions
|
||||
include ControllerWithCrossProjectAccessCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Groups::AvatarsController < Groups::ApplicationController
|
||||
before_action :authorize_admin_group!
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Groups::BoardsController < Groups::ApplicationController
|
||||
include BoardsResponses
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Groups
|
||||
class ChildrenController < Groups::ApplicationController
|
||||
before_action :group
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Groups::GroupMembersController < Groups::ApplicationController
|
||||
include MembershipActions
|
||||
include MembersPresentation
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Groups::LabelsController < Groups::ApplicationController
|
||||
include ToggleSubscriptionAction
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Groups::MilestonesController < Groups::ApplicationController
|
||||
include MilestoneActions
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Groups::RunnersController < Groups::ApplicationController
|
||||
# Proper policies should be implemented per
|
||||
# https://gitlab.com/gitlab-org/gitlab-ce/issues/45894
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Groups
|
||||
module Settings
|
||||
class CiCdController < Groups::ApplicationController
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Groups
|
||||
class SharedProjectsController < Groups::ApplicationController
|
||||
respond_to :json
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Groups::UploadsController < Groups::ApplicationController
|
||||
include UploadsActions
|
||||
include WorkhorseRequest
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Groups
|
||||
class VariablesController < Groups::ApplicationController
|
||||
before_action :authorize_admin_build!
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Import::BaseController < ApplicationController
|
||||
private
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Import::BitbucketController < Import::BaseController
|
||||
before_action :verify_bitbucket_import_enabled
|
||||
before_action :bitbucket_auth, except: :callback
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Import::FogbugzController < Import::BaseController
|
||||
before_action :verify_fogbugz_import_enabled
|
||||
before_action :user_map, only: [:new_user_map, :create_user_map]
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Import::GiteaController < Import::GithubController
|
||||
def new
|
||||
if session[access_token_key].present? && session[host_key].present?
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Import::GithubController < Import::BaseController
|
||||
before_action :verify_import_enabled
|
||||
before_action :provider_auth, only: [:status, :jobs, :create]
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Import::GitlabController < Import::BaseController
|
||||
MAX_PROJECT_PAGES = 15
|
||||
PER_PAGE_PROJECTS = 100
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Import::GitlabProjectsController < Import::BaseController
|
||||
before_action :whitelist_query_limiting, only: [:create]
|
||||
before_action :verify_gitlab_project_import_enabled
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Import::GoogleCodeController < Import::BaseController
|
||||
before_action :verify_google_code_import_enabled
|
||||
before_action :user_map, only: [:new_user_map, :create_user_map]
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Import::ManifestController < Import::BaseController
|
||||
before_action :whitelist_query_limiting, only: [:create]
|
||||
before_action :verify_import_enabled
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Ldap::OmniauthCallbacksController < OmniauthCallbacksController
|
||||
extend ::Gitlab::Utils::Override
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
|
||||
include Gitlab::GonHelper
|
||||
include Gitlab::Allowable
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
|
||||
layout 'profile'
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicationsController
|
||||
include PageLayoutHelper
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::AccountsController < Profiles::ApplicationController
|
||||
include AuthHelper
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::ActiveSessionsController < Profiles::ApplicationController
|
||||
def index
|
||||
@sessions = ActiveSession.list(current_user)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::ApplicationController < ApplicationController
|
||||
layout 'profile'
|
||||
end
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::AvatarsController < Profiles::ApplicationController
|
||||
def destroy
|
||||
@user = current_user
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::ChatNamesController < Profiles::ApplicationController
|
||||
before_action :chat_name_token, only: [:new]
|
||||
before_action :chat_name_params, only: [:new, :create, :deny]
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::EmailsController < Profiles::ApplicationController
|
||||
before_action :find_email, only: [:destroy, :resend_confirmation_instructions]
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::GpgKeysController < Profiles::ApplicationController
|
||||
before_action :set_gpg_key, only: [:destroy, :revoke]
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::KeysController < Profiles::ApplicationController
|
||||
skip_before_action :authenticate_user!, only: [:get_keys]
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::NotificationsController < Profiles::ApplicationController
|
||||
# rubocop: disable CodeReuse/ActiveRecord
|
||||
def show
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::PasswordsController < Profiles::ApplicationController
|
||||
skip_before_action :check_password_expiration, only: [:new, :create]
|
||||
skip_before_action :check_two_factor_requirement, only: [:new, :create]
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::PersonalAccessTokensController < Profiles::ApplicationController
|
||||
def index
|
||||
set_index_vars
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::PreferencesController < Profiles::ApplicationController
|
||||
before_action :user
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
|
||||
skip_before_action :check_two_factor_requirement
|
||||
|
||||
|
@ -30,7 +32,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
|
|||
|
||||
unless two_factor_grace_period_expired?
|
||||
grace_period_deadline = current_user.otp_grace_period_started_at + two_factor_grace_period.hours
|
||||
flash.now[:alert] << " You need to do this before #{l(grace_period_deadline)}."
|
||||
flash.now[:alert] = flash.now[:alert] + " You need to do this before #{l(grace_period_deadline)}."
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Profiles::U2fRegistrationsController < Profiles::ApplicationController
|
||||
def destroy
|
||||
u2f_registration = current_user.u2f_registrations.find(params[:id])
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Enable more frozen string in app/controllers/
|
||||
merge_request:
|
||||
author: gfyoung
|
||||
type: performance
|
Loading…
Reference in New Issue