Commit cc8424d4 authored by Stan Hu's avatar Stan Hu

Merge branch 'frozen-string-app-controller-more' into 'master'

Enable more frozen string in app/controllers/

See merge request gitlab-org/gitlab-ce!21873
parents 6167615a be42c050
# frozen_string_literal: true
class Dashboard::ApplicationController < ApplicationController
include ControllerWithCrossProjectAccessCheck
......
# frozen_string_literal: true
class Dashboard::GroupsController < Dashboard::ApplicationController
include GroupTree
......
# frozen_string_literal: true
class Dashboard::LabelsController < Dashboard::ApplicationController
def index
respond_to do |format|
......
# frozen_string_literal: true
class Dashboard::MilestonesController < Dashboard::ApplicationController
include MilestoneActions
......
# frozen_string_literal: true
class Dashboard::ProjectsController < Dashboard::ApplicationController
include ParamsBackwardCompatibility
include RendersMemberAccess
......
# frozen_string_literal: true
class Dashboard::SnippetsController < Dashboard::ApplicationController
skip_cross_project_access_check :index
......
# frozen_string_literal: true
class Dashboard::TodosController < Dashboard::ApplicationController
include ActionView::Helpers::NumberHelper
......
# frozen_string_literal: true
class Explore::ApplicationController < ApplicationController
skip_before_action :authenticate_user!
......
# frozen_string_literal: true
class Explore::GroupsController < Explore::ApplicationController
include GroupTree
......
# frozen_string_literal: true
class Explore::ProjectsController < Explore::ApplicationController
include ParamsBackwardCompatibility
include RendersMemberAccess
......
# frozen_string_literal: true
class Explore::SnippetsController < Explore::ApplicationController
def index
@snippets = SnippetsFinder.new(current_user).execute
......
# frozen_string_literal: true
module GoogleApi
class AuthorizationsController < ApplicationController
def callback
......
# frozen_string_literal: true
class Groups::ApplicationController < ApplicationController
include RoutableActions
include ControllerWithCrossProjectAccessCheck
......
# frozen_string_literal: true
class Groups::AvatarsController < Groups::ApplicationController
before_action :authorize_admin_group!
......
# frozen_string_literal: true
class Groups::BoardsController < Groups::ApplicationController
include BoardsResponses
......
# frozen_string_literal: true
module Groups
class ChildrenController < Groups::ApplicationController
before_action :group
......
# frozen_string_literal: true
class Groups::GroupMembersController < Groups::ApplicationController
include MembershipActions
include MembersPresentation
......
# frozen_string_literal: true
class Groups::LabelsController < Groups::ApplicationController
include ToggleSubscriptionAction
......
# frozen_string_literal: true
class Groups::MilestonesController < Groups::ApplicationController
include MilestoneActions
......
# frozen_string_literal: true
class Groups::RunnersController < Groups::ApplicationController
# Proper policies should be implemented per
# https://gitlab.com/gitlab-org/gitlab-ce/issues/45894
......
# frozen_string_literal: true
module Groups
module Settings
class CiCdController < Groups::ApplicationController
......
# frozen_string_literal: true
module Groups
class SharedProjectsController < Groups::ApplicationController
respond_to :json
......
# frozen_string_literal: true
class Groups::UploadsController < Groups::ApplicationController
include UploadsActions
include WorkhorseRequest
......
# frozen_string_literal: true
module Groups
class VariablesController < Groups::ApplicationController
before_action :authorize_admin_build!
......
# frozen_string_literal: true
class Import::BaseController < ApplicationController
private
......
# frozen_string_literal: true
class Import::BitbucketController < Import::BaseController
before_action :verify_bitbucket_import_enabled
before_action :bitbucket_auth, except: :callback
......
# 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]
......
# frozen_string_literal: true
class Import::GiteaController < Import::GithubController
def new
if session[access_token_key].present? && session[host_key].present?
......
# frozen_string_literal: true
class Import::GithubController < Import::BaseController
before_action :verify_import_enabled
before_action :provider_auth, only: [:status, :jobs, :create]
......
# frozen_string_literal: true
class Import::GitlabController < Import::BaseController
MAX_PROJECT_PAGES = 15
PER_PAGE_PROJECTS = 100
......
# frozen_string_literal: true
class Import::GitlabProjectsController < Import::BaseController
before_action :whitelist_query_limiting, only: [:create]
before_action :verify_gitlab_project_import_enabled
......
# 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]
......
# frozen_string_literal: true
class Import::ManifestController < Import::BaseController
before_action :whitelist_query_limiting, only: [:create]
before_action :verify_import_enabled
......
# frozen_string_literal: true
class Ldap::OmniauthCallbacksController < OmniauthCallbacksController
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
include Gitlab::GonHelper
include Gitlab::Allowable
......
# frozen_string_literal: true
class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
layout 'profile'
......
# frozen_string_literal: true
class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicationsController
include PageLayoutHelper
......
# frozen_string_literal: true
class Profiles::AccountsController < Profiles::ApplicationController
include AuthHelper
......
# frozen_string_literal: true
class Profiles::ActiveSessionsController < Profiles::ApplicationController
def index
@sessions = ActiveSession.list(current_user)
......
# frozen_string_literal: true
class Profiles::ApplicationController < ApplicationController
layout 'profile'
end
# frozen_string_literal: true
class Profiles::AvatarsController < Profiles::ApplicationController
def destroy
@user = current_user
......
# 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]
......
# frozen_string_literal: true
class Profiles::EmailsController < Profiles::ApplicationController
before_action :find_email, only: [:destroy, :resend_confirmation_instructions]
......
# frozen_string_literal: true
class Profiles::GpgKeysController < Profiles::ApplicationController
before_action :set_gpg_key, only: [:destroy, :revoke]
......
# frozen_string_literal: true
class Profiles::KeysController < Profiles::ApplicationController
skip_before_action :authenticate_user!, only: [:get_keys]
......
# frozen_string_literal: true
class Profiles::NotificationsController < Profiles::ApplicationController
# rubocop: disable CodeReuse/ActiveRecord
def show
......
# 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]
......
# frozen_string_literal: true
class Profiles::PersonalAccessTokensController < Profiles::ApplicationController
def index
set_index_vars
......
# frozen_string_literal: true
class Profiles::PreferencesController < Profiles::ApplicationController
before_action :user
......
# 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
......
# frozen_string_literal: true
class Profiles::U2fRegistrationsController < Profiles::ApplicationController
def destroy
u2f_registration = current_user.u2f_registrations.find(params[:id])
......
---
title: Enable more frozen string in app/controllers/
merge_request:
author: gfyoung
type: performance
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