GitLab steht aufgrund wichtiger Wartungsarbeiten am Montag, den 8. März, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 12ee2753 authored by gfyoung's avatar gfyoung

Enable even more frozen string in app/controllers

Enables frozen string for some vestigial files as
well as the following:

* app/controllers/projects/**/*.rb
* app/controllers/sherlock/**/*.rb
* app/controllers/snippets/**/*.rb
* app/controllers/users/**/*.rb

Partially addresses #47424.
parent 912d068d
# frozen_string_literal: true
module InvalidUTF8ErrorHandler
extend ActiveSupport::Concern
......
# frozen_string_literal: true
class Projects::ApplicationController < ApplicationController
include CookiesHelper
include RoutableActions
......
# frozen_string_literal: true
class Projects::ArtifactsController < Projects::ApplicationController
include ExtractsPath
include RendersBlob
......
# frozen_string_literal: true
class Projects::AutocompleteSourcesController < Projects::ApplicationController
before_action :load_autocomplete_service, except: [:members]
......
# frozen_string_literal: true
class Projects::AvatarsController < Projects::ApplicationController
include SendsBlob
......
# frozen_string_literal: true
class Projects::BadgesController < Projects::ApplicationController
layout 'project_settings'
before_action :authorize_admin_project!, only: [:index]
......
# frozen_string_literal: true
# Controller for viewing a file's blame
class Projects::BlameController < Projects::ApplicationController
include ExtractsPath
......
# frozen_string_literal: true
# Controller for viewing a file's blame
class Projects::BlobController < Projects::ApplicationController
include ExtractsPath
......
# frozen_string_literal: true
class Projects::BoardsController < Projects::ApplicationController
include BoardsResponses
include IssuableCollections
......
# frozen_string_literal: true
class Projects::BranchesController < Projects::ApplicationController
include ActionView::Helpers::SanitizeHelper
include SortingHelper
......
# frozen_string_literal: true
class Projects::BuildArtifactsController < Projects::ApplicationController
include ExtractsPath
include RendersBlob
......
# frozen_string_literal: true
class Projects::BuildsController < Projects::ApplicationController
before_action :authorize_read_build!
......
# frozen_string_literal: true
class Projects::Ci::LintsController < Projects::ApplicationController
before_action :authorize_create_pipeline!
......
# frozen_string_literal: true
class Projects::Clusters::ApplicationsController < Projects::ApplicationController
before_action :cluster
before_action :application_class, only: [:create]
......
# frozen_string_literal: true
class Projects::ClustersController < Projects::ApplicationController
before_action :cluster, except: [:index, :new, :create_gcp, :create_user]
before_action :authorize_read_cluster!
......
# frozen_string_literal: true
# Controller for a specific Commit
#
# Not to be confused with CommitsController, plural.
......
# frozen_string_literal: true
require "base64"
class Projects::CommitsController < Projects::ApplicationController
......
# frozen_string_literal: true
require 'addressable/uri'
class Projects::CompareController < Projects::ApplicationController
......
# frozen_string_literal: true
module Projects
module CycleAnalytics
class EventsController < Projects::ApplicationController
......
# frozen_string_literal: true
class Projects::CycleAnalyticsController < Projects::ApplicationController
include ActionView::Helpers::DateHelper
include ActionView::Helpers::TextHelper
......
# frozen_string_literal: true
class Projects::DeployKeysController < Projects::ApplicationController
include RepositorySettingsRedirect
respond_to :html
......
# frozen_string_literal: true
class Projects::DeployTokensController < Projects::ApplicationController
before_action :authorize_admin_project!
......
# frozen_string_literal: true
class Projects::DeploymentsController < Projects::ApplicationController
before_action :authorize_read_environment!
before_action :authorize_read_deployment!
......
# frozen_string_literal: true
class Projects::DiscussionsController < Projects::ApplicationController
include NotesHelper
include RendersNotes
......
# frozen_string_literal: true
class Projects::EnvironmentsController < Projects::ApplicationController
layout 'project'
before_action :authorize_read_environment!
......
# frozen_string_literal: true
# Controller for viewing a repository's file structure
class Projects::FindFileController < Projects::ApplicationController
include ExtractsPath
......
# frozen_string_literal: true
class Projects::ForksController < Projects::ApplicationController
include ContinueParams
......
# frozen_string_literal: true
# This file should be identical in GitLab Community Edition and Enterprise Edition
class Projects::GitHttpClientController < Projects::ApplicationController
......
# frozen_string_literal: true
class Projects::GitHttpController < Projects::GitHttpClientController
include WorkhorseRequest
......
# frozen_string_literal: true
class Projects::GraphsController < Projects::ApplicationController
include ExtractsPath
......
# frozen_string_literal: true
class Projects::GroupLinksController < Projects::ApplicationController
layout 'project_settings'
before_action :authorize_admin_project!
......
# frozen_string_literal: true
class Projects::HookLogsController < Projects::ApplicationController
include HooksExecution
......
# frozen_string_literal: true
class Projects::HooksController < Projects::ApplicationController
include HooksExecution
......
# frozen_string_literal: true
class Projects::ImportsController < Projects::ApplicationController
include ContinueParams
......
# frozen_string_literal: true
class Projects::IssuesController < Projects::ApplicationController
include RendersNotes
include ToggleSubscriptionAction
......
# frozen_string_literal: true
class Projects::JobsController < Projects::ApplicationController
include SendFileUpload
......
# frozen_string_literal: true
class Projects::LabelsController < Projects::ApplicationController
include ToggleSubscriptionAction
......@@ -138,12 +140,7 @@ def promote
end
def flash_notice_for(label, group)
notice = ''.html_safe
notice << label.title
notice << ' promoted to '
notice << view_context.link_to('<u>group label</u>'.html_safe, group_labels_path(group))
notice << '.'
notice
''.html_safe + "#{label.title} promoted to " + view_context.link_to('<u>group label</u>'.html_safe, group_labels_path(group)) + '.'
end
protected
......
# frozen_string_literal: true
class Projects::LfsApiController < Projects::GitHttpClientController
include LfsRequest
......
# frozen_string_literal: true
class Projects::LfsLocksApiController < Projects::GitHttpClientController
include LfsRequest
......
# frozen_string_literal: true
class Projects::LfsStorageController < Projects::GitHttpClientController
include LfsRequest
include WorkhorseRequest
......
# frozen_string_literal: true
class Projects::MattermostsController < Projects::ApplicationController
include TriggersHelper
include ActionView::Helpers::AssetUrlHelper
......
# frozen_string_literal: true
class Projects::MergeRequests::ApplicationController < Projects::ApplicationController
before_action :check_merge_requests_available!
before_action :merge_request
......
# frozen_string_literal: true
class Projects::MergeRequests::ConflictsController < Projects::MergeRequests::ApplicationController
include IssuableActions
......
# frozen_string_literal: true
class Projects::MergeRequests::CreationsController < Projects::MergeRequests::ApplicationController
include DiffForPath
include DiffHelper
......
# frozen_string_literal: true
class Projects::MergeRequests::DiffsController < Projects::MergeRequests::ApplicationController
include DiffForPath
include DiffHelper
......
# frozen_string_literal: true
class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationController
include ToggleSubscriptionAction
include IssuableActions
......
# frozen_string_literal: true
class Projects::MilestonesController < Projects::ApplicationController
include Gitlab::Utils::StrongMemoize
include MilestoneActions
......@@ -91,12 +93,7 @@ def promote
end
def flash_notice_for(milestone, group)
notice = ''.html_safe
notice << milestone.title
notice << ' promoted to '
notice << view_context.link_to('<u>group milestone</u>'.html_safe, group_milestone_path(group, milestone.iid))
notice << '.'
notice
''.html_safe + "#{milestone.title} promoted to " + view_context.link_to('<u>group milestone</u>'.html_safe, group_milestone_path(group, milestone.iid)) + '.'
end
def destroy
......
# frozen_string_literal: true
class Projects::MirrorsController < Projects::ApplicationController
include RepositorySettingsRedirect
......
# frozen_string_literal: true
class Projects::NetworkController < Projects::ApplicationController
include ExtractsPath
include ApplicationHelper
......
# frozen_string_literal: true
class Projects::NotesController < Projects::ApplicationController
include RendersNotes
include NotesActions
......
# frozen_string_literal: true
class Projects::PagesController < Projects::ApplicationController
layout 'project_settings'
......
# frozen_string_literal: true
class Projects::PagesDomainsController < Projects::ApplicationController
layout 'project_settings'
......
# frozen_string_literal: true
class Projects::PipelineSchedulesController < Projects::ApplicationController
before_action :schedule, except: [:index, :new, :create]
......
# frozen_string_literal: true
class Projects::PipelinesController < Projects::ApplicationController
before_action :whitelist_query_limiting, only: [:create, :retry]
before_action :pipeline, except: [:index, :new, :create, :charts]
......
# frozen_string_literal: true
class Projects::PipelinesSettingsController < Projects::ApplicationController
before_action :authorize_admin_pipeline!
......
# frozen_string_literal: true
class Projects::ProjectMembersController < Projects::ApplicationController
include MembershipActions
include MembersPresentation
......
# frozen_string_literal: true
module Projects
module Prometheus
class MetricsController < Projects::ApplicationController
......
# frozen_string_literal: true
class Projects::ProtectedBranchesController < Projects::ProtectedRefsController
protected
......
# frozen_string_literal: true
class Projects::ProtectedRefsController < Projects::ApplicationController
include RepositorySettingsRedirect
......
# frozen_string_literal: true
class Projects::ProtectedTagsController < Projects::ProtectedRefsController
protected
......
# frozen_string_literal: true
# Controller for viewing a file's raw
class Projects::RawController < Projects::ApplicationController
include ExtractsPath
......
# frozen_string_literal: true
class Projects::RefsController < Projects::ApplicationController
include ExtractsPath
include TreeHelper
......
# frozen_string_literal: true
module Projects
module Registry
class ApplicationController < Projects::ApplicationController
......
# frozen_string_literal: true
module Projects
module Registry
class RepositoriesController < ::Projects::Registry::ApplicationController
......
# frozen_string_literal: true
module Projects
module Registry
class TagsController < ::Projects::Registry::ApplicationController
......
# frozen_string_literal: true
class Projects::ReleasesController < Projects::ApplicationController
# Authorize
before_action :require_non_empty_project
......
# frozen_string_literal: true
class Projects::RepositoriesController < Projects::ApplicationController
include ExtractsPath
......
# frozen_string_literal: true
class Projects::RunnerProjectsController < Projects::ApplicationController
before_action :authorize_admin_build!
......
# frozen_string_literal: true
class Projects::RunnersController < Projects::ApplicationController
before_action :authorize_admin_build!
before_action :runner, only: [:edit, :update, :destroy, :pause, :resume, :show]
......
# frozen_string_literal: true
class Projects::ServicesController < Projects::ApplicationController
include ServiceParams
......
# frozen_string_literal: true
module Projects
module Settings
class CiCdController < Projects::ApplicationController
......
# frozen_string_literal: true
module Projects
module Settings
class IntegrationsController < Projects::ApplicationController
......
# frozen_string_literal: true
module Projects
module Settings
class RepositoryController < Projects::ApplicationController
......
# frozen_string_literal: true
class Projects::SnippetsController < Projects::ApplicationController
include RendersNotes
include ToggleAwardEmoji
......
# frozen_string_literal: true
class Projects::TagsController < Projects::ApplicationController
include SortingHelper
......
# frozen_string_literal: true
class Projects::TemplatesController < Projects::ApplicationController
before_action :authenticate_user!, :get_template_class
......
# frozen_string_literal: true
class Projects::TodosController < Projects::ApplicationController
include Gitlab::Utils::StrongMemoize
include TodosActions
......
# frozen_string_literal: true
# Controller for viewing a repository's file structure
class Projects::TreeController < Projects::ApplicationController
include ExtractsPath
......
# frozen_string_literal: true
class Projects::TriggersController < Projects::ApplicationController
before_action :authorize_admin_build!
before_action :authorize_manage_trigger!, except: [:index, :create]
......
# frozen_string_literal: true
class Projects::UploadsController < Projects::ApplicationController
include UploadsActions
include WorkhorseRequest
......
# frozen_string_literal: true
class Projects::VariablesController < Projects::ApplicationController
before_action :authorize_admin_build!
......
# frozen_string_literal: true
class Projects::WikisController < Projects::ApplicationController
include PreviewMarkdown
include Gitlab::Utils::StrongMemoize
......
# frozen_string_literal: true
module Sherlock
class ApplicationController < ::ApplicationController
before_action :find_transaction
......
# frozen_string_literal: true
module Sherlock
class FileSamplesController < Sherlock::ApplicationController
def show
......
# frozen_string_literal: true
module Sherlock
class QueriesController < Sherlock::ApplicationController
def show
......