Commit eeb999fb authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'ee-fix-rubocop-ee-module-injection-detection' into 'master'

EE: Fix detecting nested EE constants in RuboCop

See merge request gitlab-org/gitlab-ee!9189
parents 21a5744c 22819272
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Automatically sets the layout and ensures an administrator is logged in # Automatically sets the layout and ensures an administrator is logged in
class Admin::ApplicationController < ApplicationController class Admin::ApplicationController < ApplicationController
prepend EE::Admin::ApplicationController prepend EE::Admin::ApplicationController # rubocop: disable Cop/InjectEnterpriseEditionModule
before_action :authenticate_admin! before_action :authenticate_admin!
layout 'admin' layout 'admin'
......
# frozen_string_literal: true # frozen_string_literal: true
class Admin::DashboardController < Admin::ApplicationController class Admin::DashboardController < Admin::ApplicationController
prepend ::EE::Admin::DashboardController prepend ::EE::Admin::DashboardController # rubocop: disable Cop/InjectEnterpriseEditionModule
include CountHelper include CountHelper
......
# frozen_string_literal: true # frozen_string_literal: true
class Admin::ProjectsController < Admin::ApplicationController class Admin::ProjectsController < Admin::ApplicationController
prepend EE::Admin::ProjectsController prepend EE::Admin::ProjectsController # rubocop: disable Cop/InjectEnterpriseEditionModule
include MembersPresentation include MembersPresentation
before_action :project, only: [:show, :transfer, :repository_check] before_action :project, only: [:show, :transfer, :repository_check]
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Boards module Boards
class ListsController < Boards::ApplicationController class ListsController < Boards::ApplicationController
prepend ::EE::Boards::ListsController prepend ::EE::Boards::ListsController # rubocop: disable Cop/InjectEnterpriseEditionModule
include BoardsResponses include BoardsResponses
......
# frozen_string_literal: true # frozen_string_literal: true
class Import::GithubController < Import::BaseController class Import::GithubController < Import::BaseController
prepend ::EE::Import::GithubController prepend ::EE::Import::GithubController # rubocop: disable Cop/InjectEnterpriseEditionModule
before_action :verify_import_enabled before_action :verify_import_enabled
before_action :provider_auth, only: [:status, :jobs, :create] before_action :provider_auth, only: [:status, :jobs, :create]
......
# frozen_string_literal: true # frozen_string_literal: true
class Projects::AutocompleteSourcesController < Projects::ApplicationController class Projects::AutocompleteSourcesController < Projects::ApplicationController
prepend EE::Projects::AutocompleteSourcesController prepend EE::Projects::AutocompleteSourcesController # rubocop: disable Cop/InjectEnterpriseEditionModule
def members def members
render json: ::Projects::ParticipantsService.new(@project, current_user).execute(target) render json: ::Projects::ParticipantsService.new(@project, current_user).execute(target)
......
...@@ -15,7 +15,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController ...@@ -15,7 +15,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController
push_frontend_feature_flag(:area_chart, project) push_frontend_feature_flag(:area_chart, project)
end end
prepend ::EE::Projects::EnvironmentsController prepend ::EE::Projects::EnvironmentsController # rubocop: disable Cop/InjectEnterpriseEditionModule
def index def index
@environments = project.environments @environments = project.environments
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
class Projects::GitHttpClientController < Projects::ApplicationController class Projects::GitHttpClientController < Projects::ApplicationController
include ActionController::HttpAuthentication::Basic include ActionController::HttpAuthentication::Basic
include KerberosSpnegoHelper include KerberosSpnegoHelper
prepend ::EE::Projects::GitHttpClientController prepend ::EE::Projects::GitHttpClientController # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :authentication_result, :redirected_path attr_reader :authentication_result, :redirected_path
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
class Projects::GitHttpController < Projects::GitHttpClientController class Projects::GitHttpController < Projects::GitHttpClientController
include WorkhorseRequest include WorkhorseRequest
prepend ::EE::Projects::GitHttpController prepend ::EE::Projects::GitHttpController # rubocop: disable Cop/InjectEnterpriseEditionModule
before_action :access_check before_action :access_check
......
...@@ -9,7 +9,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -9,7 +9,7 @@ class Projects::IssuesController < Projects::ApplicationController
include IssuesCalendar include IssuesCalendar
include SpammableActions include SpammableActions
prepend ::EE::Projects::IssuesController prepend ::EE::Projects::IssuesController # rubocop: disable Cop/InjectEnterpriseEditionModule
def self.issue_except_actions def self.issue_except_actions
%i[index calendar new create bulk_update import_csv] %i[index calendar new create bulk_update import_csv]
......
# frozen_string_literal: true # frozen_string_literal: true
class Projects::MergeRequests::ApplicationController < Projects::ApplicationController class Projects::MergeRequests::ApplicationController < Projects::ApplicationController
prepend ::EE::Projects::MergeRequests::ApplicationController prepend ::EE::Projects::MergeRequests::ApplicationController # rubocop: disable Cop/InjectEnterpriseEditionModule
before_action :check_merge_requests_available! before_action :check_merge_requests_available!
before_action :merge_request before_action :merge_request
......
# frozen_string_literal: true # frozen_string_literal: true
class Projects::MergeRequests::DiffsController < Projects::MergeRequests::ApplicationController class Projects::MergeRequests::DiffsController < Projects::MergeRequests::ApplicationController
prepend ::EE::Projects::MergeRequests::DiffsController prepend ::EE::Projects::MergeRequests::DiffsController # rubocop: disable Cop/InjectEnterpriseEditionModule
include DiffForPath include DiffForPath
include DiffHelper include DiffHelper
......
...@@ -8,7 +8,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -8,7 +8,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
include ToggleAwardEmoji include ToggleAwardEmoji
include IssuableCollections include IssuableCollections
prepend ::EE::Projects::MergeRequestsController prepend ::EE::Projects::MergeRequestsController # rubocop: disable Cop/InjectEnterpriseEditionModule
skip_before_action :merge_request, only: [:index, :bulk_update] skip_before_action :merge_request, only: [:index, :bulk_update]
before_action :whitelist_query_limiting, only: [:assign_related_issues, :update] before_action :whitelist_query_limiting, only: [:assign_related_issues, :update]
......
# frozen_string_literal: true # frozen_string_literal: true
class Projects::PipelinesController < Projects::ApplicationController class Projects::PipelinesController < Projects::ApplicationController
prepend ::EE::Projects::PipelinesController prepend ::EE::Projects::PipelinesController # rubocop: disable Cop/InjectEnterpriseEditionModule
before_action :whitelist_query_limiting, only: [:create, :retry] before_action :whitelist_query_limiting, only: [:create, :retry]
before_action :pipeline, except: [:index, :new, :create, :charts] before_action :pipeline, except: [:index, :new, :create, :charts]
......
...@@ -6,7 +6,7 @@ module Projects ...@@ -6,7 +6,7 @@ module Projects
before_action :authorize_admin_pipeline! before_action :authorize_admin_pipeline!
before_action :define_variables before_action :define_variables
prepend ::EE::Projects::Settings::CiCdController prepend ::EE::Projects::Settings::CiCdController # rubocop: disable Cop/InjectEnterpriseEditionModule
def show def show
end end
......
...@@ -6,7 +6,7 @@ module Projects ...@@ -6,7 +6,7 @@ module Projects
before_action :authorize_admin_project! before_action :authorize_admin_project!
before_action :remote_mirror, only: [:show] before_action :remote_mirror, only: [:show]
prepend ::EE::Projects::Settings::RepositoryController prepend ::EE::Projects::Settings::RepositoryController # rubocop: disable Cop/InjectEnterpriseEditionModule
def show def show
render_show render_show
......
# frozen_string_literal: true # frozen_string_literal: true
class Projects::VariablesController < Projects::ApplicationController class Projects::VariablesController < Projects::ApplicationController
prepend ::EE::Projects::VariablesController prepend ::EE::Projects::VariablesController # rubocop: disable Cop/InjectEnterpriseEditionModule
before_action :authorize_admin_build! before_action :authorize_admin_build!
......
...@@ -51,7 +51,7 @@ module ProtectedRefAccess ...@@ -51,7 +51,7 @@ module ProtectedRefAccess
end end
end end
ProtectedRefAccess.include(EE::ProtectedRefAccess::Scopes) ProtectedRefAccess.include(EE::ProtectedRefAccess::Scopes) # rubocop: disable Cop/InjectEnterpriseEditionModule
ProtectedRefAccess.prepend(EE::ProtectedRefAccess) # rubocop: disable Cop/InjectEnterpriseEditionModule ProtectedRefAccess.prepend(EE::ProtectedRefAccess) # rubocop: disable Cop/InjectEnterpriseEditionModule
# When using `prepend` (or `include` for that matter), the `ClassMethods` # When using `prepend` (or `include` for that matter), the `ClassMethods`
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module ChatMessage module ChatMessage
class MergeMessage < BaseMessage class MergeMessage < BaseMessage
prepend ::EE::ChatMessage::MergeMessage prepend ::EE::ChatMessage::MergeMessage # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :merge_request_iid attr_reader :merge_request_iid
attr_reader :source_branch attr_reader :source_branch
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Applications module Applications
class CreateService class CreateService
prepend ::EE::Applications::CreateService prepend ::EE::Applications::CreateService # rubocop: disable Cop/InjectEnterpriseEditionModule
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def initialize(current_user, params) def initialize(current_user, params)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Boards module Boards
module Issues module Issues
class CreateService < Boards::BaseService class CreateService < Boards::BaseService
prepend ::EE::Boards::Issues::CreateService prepend ::EE::Boards::Issues::CreateService # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_accessor :project attr_accessor :project
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Boards module Boards
module Lists module Lists
class ListService < Boards::BaseService class ListService < Boards::BaseService
prepend ::EE::Boards::Lists::ListService prepend ::EE::Boards::Lists::ListService # rubocop: disable Cop/InjectEnterpriseEditionModule
def execute(board) def execute(board)
board.lists.create(list_type: :backlog) unless board.lists.backlog.exists? board.lists.create(list_type: :backlog) unless board.lists.backlog.exists?
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Emails module Emails
class CreateService < ::Emails::BaseService class CreateService < ::Emails::BaseService
prepend ::EE::Emails::CreateService prepend ::EE::Emails::CreateService # rubocop: disable Cop/InjectEnterpriseEditionModule
def execute(extra_params = {}) def execute(extra_params = {})
skip_confirmation = @params.delete(:skip_confirmation) skip_confirmation = @params.delete(:skip_confirmation)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Emails module Emails
class DestroyService < ::Emails::BaseService class DestroyService < ::Emails::BaseService
prepend ::EE::Emails::DestroyService prepend ::EE::Emails::DestroyService # rubocop: disable Cop/InjectEnterpriseEditionModule
def execute(email) def execute(email)
email.destroy && update_secondary_emails! email.destroy && update_secondary_emails!
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Groups module Groups
class CreateService < Groups::BaseService class CreateService < Groups::BaseService
prepend ::EE::Groups::CreateService prepend ::EE::Groups::CreateService # rubocop: disable Cop/InjectEnterpriseEditionModule
def initialize(user, params = {}) def initialize(user, params = {})
@current_user, @params = user, params.dup @current_user, @params = user, params.dup
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Groups module Groups
class DestroyService < Groups::BaseService class DestroyService < Groups::BaseService
prepend ::EE::Groups::DestroyService prepend ::EE::Groups::DestroyService # rubocop: disable Cop/InjectEnterpriseEditionModule
DestroyError = Class.new(StandardError) DestroyError = Class.new(StandardError)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Groups module Groups
class UpdateService < Groups::BaseService class UpdateService < Groups::BaseService
include UpdateVisibilityLevel include UpdateVisibilityLevel
prepend ::EE::Groups::UpdateService prepend ::EE::Groups::UpdateService # rubocop: disable Cop/InjectEnterpriseEditionModule
def execute def execute
reject_parent_id! reject_parent_id!
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Issues module Issues
class BuildService < Issues::BaseService class BuildService < Issues::BaseService
include ResolveDiscussions include ResolveDiscussions
prepend ::EE::Issues::BuildService prepend ::EE::Issues::BuildService # rubocop: disable Cop/InjectEnterpriseEditionModule
def execute def execute
filter_resolve_discussion_params filter_resolve_discussion_params
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Issues module Issues
class MoveService < Issuable::Clone::BaseService class MoveService < Issuable::Clone::BaseService
prepend ::EE::Issues::MoveService prepend ::EE::Issues::MoveService # rubocop: disable Cop/InjectEnterpriseEditionModule
MoveError = Class.new(StandardError) MoveError = Class.new(StandardError)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module MergeRequests module MergeRequests
class UpdateService < MergeRequests::BaseService class UpdateService < MergeRequests::BaseService
prepend ::EE::MergeRequests::UpdateService prepend ::EE::MergeRequests::UpdateService # rubocop: disable Cop/InjectEnterpriseEditionModule
def execute(merge_request) def execute(merge_request)
# We don't allow change of source/target projects and source branch # We don't allow change of source/target projects and source branch
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Notes module Notes
class BuildService < ::BaseService class BuildService < ::BaseService
prepend ::EE::Notes::BuildService prepend ::EE::Notes::BuildService # rubocop: disable Cop/InjectEnterpriseEditionModule
def execute def execute
should_resolve = false should_resolve = false
......
...@@ -242,7 +242,7 @@ module NotificationRecipientService ...@@ -242,7 +242,7 @@ module NotificationRecipientService
end end
class Default < Base class Default < Base
prepend ::EE::NotificationRecipientBuilders::Default prepend ::EE::NotificationRecipientBuilders::Default # rubocop: disable Cop/InjectEnterpriseEditionModule
MENTION_TYPE_ACTIONS = [:new_issue, :new_merge_request].freeze MENTION_TYPE_ACTIONS = [:new_issue, :new_merge_request].freeze
......
...@@ -12,7 +12,7 @@ module Projects ...@@ -12,7 +12,7 @@ module Projects
# #
# Projects::AfterRenameService.new(project).execute # Projects::AfterRenameService.new(project).execute
class AfterRenameService class AfterRenameService
prepend ::EE::Projects::AfterRenameService prepend ::EE::Projects::AfterRenameService # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :project, :full_path_before, :full_path_after, :path_before attr_reader :project, :full_path_before, :full_path_after, :path_before
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Projects module Projects
class AutocompleteService < BaseService class AutocompleteService < BaseService
prepend EE::Projects::AutocompleteService prepend EE::Projects::AutocompleteService # rubocop: disable Cop/InjectEnterpriseEditionModule
include LabelsAsHash include LabelsAsHash
def issues def issues
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Projects module Projects
class CreateFromTemplateService < BaseService class CreateFromTemplateService < BaseService
prepend ::EE::Projects::CreateFromTemplateService prepend ::EE::Projects::CreateFromTemplateService # rubocop: disable Cop/InjectEnterpriseEditionModule
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
def initialize(user, params) def initialize(user, params)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Projects module Projects
class CreateService < BaseService class CreateService < BaseService
prepend ::EE::Projects::CreateService prepend ::EE::Projects::CreateService # rubocop: disable Cop/InjectEnterpriseEditionModule
def initialize(user, params) def initialize(user, params)
@current_user, @params = user, params.dup @current_user, @params = user, params.dup
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Projects module Projects
class DestroyService < BaseService class DestroyService < BaseService
include Gitlab::ShellAdapter include Gitlab::ShellAdapter
prepend ::EE::Projects::DestroyService prepend ::EE::Projects::DestroyService # rubocop: disable Cop/InjectEnterpriseEditionModule
DestroyError = Class.new(StandardError) DestroyError = Class.new(StandardError)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# The latter will under the hood just import an archive supplied by GitLab. # The latter will under the hood just import an archive supplied by GitLab.
module Projects module Projects
class GitlabProjectsImportService class GitlabProjectsImportService
prepend ::EE::Projects::GitlabProjectsImportService prepend ::EE::Projects::GitlabProjectsImportService # rubocop: disable Cop/InjectEnterpriseEditionModule
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
include Gitlab::TemplateHelper include Gitlab::TemplateHelper
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Projects module Projects
module GroupLinks module GroupLinks
class CreateService < BaseService class CreateService < BaseService
prepend ::EE::Projects::GroupLinks::CreateService prepend ::EE::Projects::GroupLinks::CreateService # rubocop: disable Cop/InjectEnterpriseEditionModule
def execute(group) def execute(group)
return false unless group return false unless group
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Projects module Projects
module GroupLinks module GroupLinks
class DestroyService < BaseService class DestroyService < BaseService
prepend ::EE::Projects::GroupLinks::DestroyService prepend ::EE::Projects::GroupLinks::DestroyService # rubocop: disable Cop/InjectEnterpriseEditionModule
def execute(group_link) def execute(group_link)
return false unless group_link return false unless group_link
......
...@@ -7,7 +7,7 @@ module Projects ...@@ -7,7 +7,7 @@ module Projects
class MigrateAttachmentsService < BaseService class MigrateAttachmentsService < BaseService
attr_reader :logger, :old_disk_path, :new_disk_path attr_reader :logger, :old_disk_path, :new_disk_path
prepend ::EE::Projects::HashedStorage::MigrateAttachmentsService prepend ::EE::Projects::HashedStorage::MigrateAttachmentsService # rubocop: disable Cop/InjectEnterpriseEditionModule
def initialize(project, old_disk_path, logger: nil) def initialize(project, old_disk_path, logger: nil)
@project = project @project = project
......
...@@ -7,7 +7,7 @@ module Projects ...@@ -7,7 +7,7 @@ module Projects
class MigrateRepositoryService < BaseService class MigrateRepositoryService < BaseService
include Gitlab::ShellAdapter include Gitlab::ShellAdapter
prepend ::EE::Projects::HashedStorage::MigrateRepositoryService prepend ::EE::Projects::HashedStorage::MigrateRepositoryService # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :old_disk_path, :new_disk_path, :old_wiki_disk_path, :old_storage_version, :logger, :move_wiki attr_reader :old_disk_path, :new_disk_path, :old_wiki_disk_path, :old_storage_version, :logger, :move_wiki
......
...@@ -13,7 +13,7 @@ module Projects ...@@ -13,7 +13,7 @@ module Projects
include Gitlab::ShellAdapter include Gitlab::ShellAdapter
TransferError = Class.new(StandardError) TransferError = Class.new(StandardError)
prepend ::EE::Projects::TransferService prepend ::EE::Projects::TransferService # rubocop: disable Cop/InjectEnterpriseEditionModule
def execute(new_namespace) def execute(new_namespace)
@new_namespace = new_namespace @new_namespace = new_namespace
......
...@@ -4,7 +4,7 @@ module Projects ...@@ -4,7 +4,7 @@ module Projects
class UpdateService < BaseService class UpdateService < BaseService
include UpdateVisibilityLevel include UpdateVisibilityLevel
prepend ::EE::Projects::UpdateService prepend ::EE::Projects::UpdateService # rubocop: disable Cop/InjectEnterpriseEditionModule
ValidationError = Class.new(StandardError) ValidationError = Class.new(StandardError)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Users module Users
class BuildService < BaseService class BuildService < BaseService
prepend ::EE::Users::BuildService prepend ::EE::Users::BuildService # rubocop: disable Cop/InjectEnterpriseEditionModule
delegate :user_default_internal_regex_enabled?, delegate :user_default_internal_regex_enabled?,
:user_default_internal_regex_instance, :user_default_internal_regex_instance,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Users module Users
class DestroyService class DestroyService
prepend ::EE::Users::DestroyService prepend ::EE::Users::DestroyService # rubocop: disable Cop/InjectEnterpriseEditionModule
DestroyError = Class.new(StandardError) DestroyError = Class.new(StandardError)
......
...@@ -137,7 +137,7 @@ module ObjectStorage ...@@ -137,7 +137,7 @@ module ObjectStorage
included do |base| included do |base|
base.include(ObjectStorage) base.include(ObjectStorage)
include ::EE::ObjectStorage::Concern include ::EE::ObjectStorage::Concern # rubocop: disable Cop/InjectEnterpriseEditionModule
after :migrate, :delete_migrated_file after :migrate, :delete_migrated_file
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module RepositoryCheck module RepositoryCheck
class BatchWorker class BatchWorker
prepend ::EE::RepositoryCheck::BatchWorker prepend ::EE::RepositoryCheck::BatchWorker # rubocop: disable Cop/InjectEnterpriseEditionModule
include ApplicationWorker include ApplicationWorker
include RepositoryCheckQueue include RepositoryCheckQueue
......
...@@ -5,7 +5,7 @@ module RepositoryCheck ...@@ -5,7 +5,7 @@ module RepositoryCheck
include ApplicationWorker include ApplicationWorker
include RepositoryCheckQueue include RepositoryCheckQueue
prepend ::EE::RepositoryCheck::SingleRepositoryWorker prepend ::EE::RepositoryCheck::SingleRepositoryWorker # rubocop: disable Cop/InjectEnterpriseEditionModule
def perform(project_id) def perform(project_id)
project = Project.find(project_id) project = Project.find(project_id)
......
...@@ -43,7 +43,7 @@ class Rack::Attack ...@@ -43,7 +43,7 @@ class Rack::Attack
end end
class Request class Request
prepend ::EE::Gitlab::Rack::Attack::Request prepend ::EE::Gitlab::Rack::Attack::Request # rubocop: disable Cop/InjectEnterpriseEditionModule
def unauthenticated? def unauthenticated?
!authenticated_user_id([:api, :rss, :ics]) !authenticated_user_id([:api, :rss, :ics])
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module EE module EE
module ConfirmationsController module ConfirmationsController
include EE::Audit::Changes include EE::Audit::Changes # rubocop: disable Cop/InjectEnterpriseEditionModule
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
protected protected
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module EE module EE
module Emails module Emails
module CreateService module CreateService
include ::EE::Emails::BaseService include ::EE::Emails::BaseService # rubocop: disable Cop/InjectEnterpriseEditionModule
def execute(*args, &blk) def execute(*args, &blk)
super.tap do |email| super.tap do |email|
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module EE module EE
module Emails module Emails
module DestroyService module DestroyService
include ::EE::Emails::BaseService include ::EE::Emails::BaseService # rubocop: disable Cop/InjectEnterpriseEditionModule
def execute(*args, &blk) def execute(*args, &blk)
super.tap do super.tap do
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module EE module EE
module Users module Users
module UpdateService module UpdateService
include EE::Audit::Changes include EE::Audit::Changes # rubocop: disable Cop/InjectEnterpriseEditionModule
private private
......
...@@ -6,7 +6,7 @@ module EE ...@@ -6,7 +6,7 @@ module EE
include ::API::PaginationParams include ::API::PaginationParams
include ::API::BoardsResponses include ::API::BoardsResponses
prepend EE::API::BoardsResponses prepend EE::API::BoardsResponses # rubocop: disable Cop/InjectEnterpriseEditionModule
before { authenticate! } before { authenticate! }
......
...@@ -6,7 +6,7 @@ module EE ...@@ -6,7 +6,7 @@ module EE
include ::API::PaginationParams include ::API::PaginationParams
include ::API::BoardsResponses include ::API::BoardsResponses
prepend EE::API::BoardsResponses prepend EE::API::BoardsResponses # rubocop: disable Cop/InjectEnterpriseEditionModule
before do before do
authenticate! authenticate!
......
...@@ -41,7 +41,7 @@ module API ...@@ -41,7 +41,7 @@ module API
# Helper Methods for Grape Endpoint # Helper Methods for Grape Endpoint
module HelperMethods module HelperMethods
prepend EE::API::APIGuard::HelperMethods prepend EE::API::APIGuard::HelperMethods # rubocop: disable Cop/InjectEnterpriseEditionModule
include Gitlab::Auth::UserAuthFinders include Gitlab::Auth::UserAuthFinders
def find_current_user! def find_current_user!
......
...@@ -5,7 +5,7 @@ module API ...@@ -5,7 +5,7 @@ module API
include BoardsResponses include BoardsResponses
include PaginationParams include PaginationParams
prepend EE::API::BoardsResponses prepend EE::API::BoardsResponses # rubocop: disable Cop/InjectEnterpriseEditionModule
before { authenticate! } before { authenticate! }
......
...@@ -5,7 +5,7 @@ module API ...@@ -5,7 +5,7 @@ module API
include BoardsResponses include BoardsResponses
include PaginationParams include PaginationParams
prepend EE::API::BoardsResponses prepend EE::API::BoardsResponses # rubocop: disable Cop/InjectEnterpriseEditionModule
before do before do
authenticate! authenticate!
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module API module API
module Helpers module Helpers
prepend EE::API::Helpers prepend EE::API::Helpers # rubocop: disable Cop/InjectEnterpriseEditionModule
include Gitlab::Utils include Gitlab::Utils
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module API module API
module Helpers module Helpers
module NotesHelpers module NotesHelpers
prepend EE::API::Helpers::NotesHelpers prepend EE::API::Helpers::NotesHelpers # rubocop: disable Cop/InjectEnterpriseEditionModule
def update_note(noteable, note_id) def update_note(noteable, note_id)
note = noteable.notes.find(params[:note_id]) note = noteable.notes.find(params[:note_id])
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module API module API
module Helpers module Helpers
module ProjectSnapshotsHelpers module ProjectSnapshotsHelpers
prepend ::EE::API::Helpers::ProjectSnapshotsHelpers prepend ::EE::API::Helpers::ProjectSnapshotsHelpers # rubocop: disable Cop/InjectEnterpriseEditionModule
def authorize_read_git_snapshot! def authorize_read_git_snapshot!
authenticated_with_full_private_access! authenticated_with_full_private_access!
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module API module API
module Helpers module Helpers
module Runner module Runner
prepend EE::API::Helpers::Runner prepend EE::API::Helpers::Runner # rubocop: disable Cop/InjectEnterpriseEditionModule
JOB_TOKEN_HEADER = 'HTTP_JOB_TOKEN'.freeze JOB_TOKEN_HEADER = 'HTTP_JOB_TOKEN'.freeze
JOB_TOKEN_PARAM = :token JOB_TOKEN_PARAM = :token
......
...@@ -17,7 +17,7 @@ module API ...@@ -17,7 +17,7 @@ module API
end end
end end
prepend EE::API::Issues prepend EE::API::Issues # rubocop: disable Cop/InjectEnterpriseEditionModule
helpers do helpers do
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
......
...@@ -11,7 +11,7 @@ module API ...@@ -11,7 +11,7 @@ module API
end end
end end
prepend EE::API::JobArtifacts prepend EE::API::JobArtifacts # rubocop: disable Cop/InjectEnterpriseEditionModule
params do params do
requires :id, type: String, desc: 'The ID of a project' requires :id, type: String, desc: 'The ID of a project'
......
...@@ -29,7 +29,7 @@ module API ...@@ -29,7 +29,7 @@ module API
] ]
end end
prepend EE::API::MergeRequests prepend EE::API::MergeRequests # rubocop: disable Cop/InjectEnterpriseEditionModule
helpers do helpers do
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
......
...@@ -17,7 +17,7 @@ module API ...@@ -17,7 +17,7 @@ module API
end end
end end
prepend EE::API::Namespaces prepend EE::API::Namespaces # rubocop: disable Cop/InjectEnterpriseEditionModule
resource :namespaces do resource :namespaces do
desc 'Get a namespaces list' do desc 'Get a namespaces list' do
......
...@@ -16,7 +16,7 @@ module API ...@@ -16,7 +16,7 @@ module API
end end
end end
prepend EE::API::ProjectClusters prepend EE::API::ProjectClusters # rubocop: disable Cop/InjectEnterpriseEditionModule
params do params do
requires :id, type: String, desc: 'The ID of the project' requires :id, type: String, desc: 'The ID of the project'
......
...@@ -32,7 +32,7 @@ module API ...@@ -32,7 +32,7 @@ module API
end end
end end
prepend EE::API::Projects prepend EE::API::Projects # rubocop: disable Cop/InjectEnterpriseEditionModule
def self.update_params_at_least_one_of def self.update_params_at_least_one_of
[ [
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module API module API
class Todos < Grape::API class Todos < Grape::API
include PaginationParams include PaginationParams
prepend EE::API::Todos prepend EE::API::Todos # rubocop: disable Cop/InjectEnterpriseEditionModule
before { authenticate! } before { authenticate! }
......
...@@ -4,7 +4,7 @@ module Banzai ...@@ -4,7 +4,7 @@ module Banzai
module Filter module Filter
# The actual filter is implemented in the EE mixin # The actual filter is implemented in the EE mixin
class EpicReferenceFilter < IssuableReferenceFilter class EpicReferenceFilter < IssuableReferenceFilter
prepend EE::Banzai::Filter::EpicReferenceFilter prepend EE::Banzai::Filter::EpicReferenceFilter # rubocop: disable Cop/InjectEnterpriseEditionModule
self.reference_type = :epic self.reference_type = :epic
......
...@@ -9,7 +9,7 @@ module Banzai ...@@ -9,7 +9,7 @@ module Banzai
# so we can avoid N+1 queries problem # so we can avoid N+1 queries problem
class IssuableExtractor class IssuableExtractor
prepend EE::Banzai::IssuableExtractor prepend EE::Banzai::IssuableExtractor # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :context attr_reader :context
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Banzai module Banzai
module Pipeline module Pipeline
class GfmPipeline < BasePipeline class GfmPipeline < BasePipeline
prepend EE::Banzai::Pipeline::GfmPipeline prepend EE::Banzai::Pipeline::GfmPipeline # rubocop: disable Cop/InjectEnterpriseEditionModule
# These filters convert GitLab Flavored Markdown (GFM) to HTML. # These filters convert GitLab Flavored Markdown (GFM) to HTML.
# The handlers defined in app/assets/javascripts/behaviors/markdown/copy_as_gfm.js # The handlers defined in app/assets/javascripts/behaviors/markdown/copy_as_gfm.js
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Banzai module Banzai
module Pipeline module Pipeline
class PostProcessPipeline < BasePipeline class PostProcessPipeline < BasePipeline
prepend EE::Banzai::Pipeline::PostProcessPipeline prepend EE::Banzai::Pipeline::PostProcessPipeline # rubocop: disable Cop/InjectEnterpriseEditionModule
def self.filters def self.filters
@filters ||= FilterArray[ @filters ||= FilterArray[
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Banzai module Banzai
module Pipeline module Pipeline
class SingleLinePipeline < GfmPipeline class SingleLinePipeline < GfmPipeline
prepend EE::Banzai::Pipeline::SingleLinePipeline prepend EE::Banzai::Pipeline::SingleLinePipeline # rubocop: disable Cop/InjectEnterpriseEditionModule
def self.filters def self.filters
@filters ||= FilterArray[ @filters ||= FilterArray[
......
...@@ -4,7 +4,7 @@ module Banzai ...@@ -4,7 +4,7 @@ module Banzai
module ReferenceParser module ReferenceParser
# The actual parser is implemented in the EE mixin # The actual parser is implemented in the EE mixin
class EpicParser < IssuableParser class EpicParser < IssuableParser
prepend ::EE::Banzai::ReferenceParser::EpicParser prepend ::EE::Banzai::ReferenceParser::EpicParser # rubocop: disable Cop/InjectEnterpriseEditionModule
self.reference_type = :epic self.reference_type = :epic
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
module Gitlab module Gitlab
module Access module Access
extend ::EE::Gitlab::Access extend ::EE::Gitlab::Access # rubocop: disable Cop/InjectEnterpriseEditionModule
AccessDeniedError = Class.new(StandardError) AccessDeniedError = Class.new(StandardError)
......
...@@ -16,7 +16,7 @@ module Gitlab ...@@ -16,7 +16,7 @@ module Gitlab
DEFAULT_SCOPES = [:api].freeze DEFAULT_SCOPES = [:api].freeze
class << self class << self
prepend EE::Gitlab::Auth prepend EE::Gitlab::Auth # rubocop: disable Cop/InjectEnterpriseEditionModule
def omniauth_enabled? def omniauth_enabled?
Gitlab.config.omniauth.enabled Gitlab.config.omniauth.enabled
......
...@@ -8,7 +8,7 @@ module Gitlab ...@@ -8,7 +8,7 @@ module Gitlab
module Auth module Auth
module LDAP module LDAP
class Access class Access
prepend ::EE::Gitlab::Auth::LDAP::Access prepend ::EE::Gitlab::Auth::LDAP::Access # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :provider, :user, :ldap_identity attr_reader :provider, :user, :ldap_identity
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Auth module Auth
module LDAP module LDAP
class Adapter class Adapter
prepend ::EE::Gitlab::Auth::LDAP::Adapter prepend ::EE::Gitlab::Auth::LDAP::Adapter # rubocop: disable Cop/InjectEnterpriseEditionModule
SEARCH_RETRY_FACTOR = [1, 1, 2, 3].freeze SEARCH_RETRY_FACTOR = [1, 1, 2, 3].freeze
MAX_SEARCH_RETRIES = Rails.env.test? ? 1 : SEARCH_RETRY_FACTOR.size.freeze MAX_SEARCH_RETRIES = Rails.env.test? ? 1 : SEARCH_RETRY_FACTOR.size.freeze
......
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
module Auth module Auth
module LDAP module LDAP
class Config class Config
prepend ::EE::Gitlab::Auth::LDAP::Config prepend ::EE::Gitlab::Auth::LDAP::Config # rubocop: disable Cop/InjectEnterpriseEditionModule
NET_LDAP_ENCRYPTION_METHOD = { NET_LDAP_ENCRYPTION_METHOD = {
simple_tls: :simple_tls, simple_tls: :simple_tls,
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Auth module Auth
module LDAP module LDAP
class Person class Person
prepend ::EE::Gitlab::Auth::LDAP::Person prepend ::EE::Gitlab::Auth::LDAP::Person # rubocop: disable Cop/InjectEnterpriseEditionModule
# Active Directory-specific LDAP filter that checks if bit 2 of the # Active Directory-specific LDAP filter that checks if bit 2 of the
# userAccountControl attribute is set. # userAccountControl attribute is set.
......
...@@ -11,7 +11,7 @@ module Gitlab ...@@ -11,7 +11,7 @@ module Gitlab
module LDAP module LDAP
class User < Gitlab::Auth::OAuth::User class User < Gitlab::Auth::OAuth::User
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
prepend ::EE::Gitlab::Auth::LDAP::User prepend ::EE::Gitlab::Auth::LDAP::User # rubocop: disable Cop/InjectEnterpriseEditionModule
class << self class << self
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
......
...@@ -6,7 +6,7 @@ module Gitlab ...@@ -6,7 +6,7 @@ module Gitlab
module Auth module Auth
module OAuth module OAuth
class AuthHash class AuthHash
prepend ::EE::Gitlab::Auth::OAuth::AuthHash prepend ::EE::Gitlab::Auth::OAuth::AuthHash # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :auth_hash attr_reader :auth_hash
def initialize(auth_hash) def initialize(auth_hash)
......
...@@ -9,7 +9,7 @@ module Gitlab ...@@ -9,7 +9,7 @@ module Gitlab
module Auth module Auth
module OAuth module OAuth
class User class User
prepend ::EE::Gitlab::Auth::OAuth::User prepend ::EE::Gitlab::Auth::OAuth::User # rubocop: disable Cop/InjectEnterpriseEditionModule
SignupDisabledError = Class.new(StandardError) SignupDisabledError = Class.new(StandardError)
SigninDisabledForProviderError = Class.new(StandardError) SigninDisabledForProviderError = Class.new(StandardError)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
module Gitlab module Gitlab
module Auth module Auth
Result = Struct.new(:actor, :project, :type, :authentication_abilities) do Result = Struct.new(:actor, :project, :type, :authentication_abilities) do
prepend ::EE::Gitlab::Auth::Result prepend ::EE::Gitlab::Auth::Result # rubocop: disable Cop/InjectEnterpriseEditionModule
def ci?(for_project) def ci?(for_project)
type == :ci && type == :ci &&
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Auth module Auth
module Saml module Saml
class Config class Config
prepend ::EE::Gitlab::Auth::Saml::Config prepend ::EE::Gitlab::Auth::Saml::Config # rubocop: disable Cop/InjectEnterpriseEditionModule
class << self class << self
def options def options
......
...@@ -9,7 +9,7 @@ module Gitlab ...@@ -9,7 +9,7 @@ module Gitlab
module Auth module Auth
module Saml module Saml
class User < Gitlab::Auth::OAuth::User class User < Gitlab::Auth::OAuth::User
prepend ::EE::Gitlab::Auth::Saml::User prepend ::EE::Gitlab::Auth::Saml::User # rubocop: disable Cop/InjectEnterpriseEditionModule
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
......
...@@ -18,7 +18,7 @@ module Gitlab ...@@ -18,7 +18,7 @@ module Gitlab
end end
module UserAuthFinders module UserAuthFinders
prepend ::EE::Gitlab::Auth::UserAuthFinders prepend ::EE::Gitlab::Auth::UserAuthFinders # rubocop: disable Cop/InjectEnterpriseEditionModule
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
......
...@@ -6,7 +6,7 @@ require_relative 'redact_links/redactable' ...@@ -6,7 +6,7 @@ require_relative 'redact_links/redactable'
module Gitlab module Gitlab
module BackgroundMigration module BackgroundMigration
class RedactLinks class RedactLinks
prepend EE::Gitlab::BackgroundMigration::RedactLinks prepend EE::Gitlab::BackgroundMigration::RedactLinks # rubocop: disable Cop/InjectEnterpriseEditionModule
class Note < ActiveRecord::Base class Note < ActiveRecord::Base
include EachBatch include EachBatch
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module Checks module Checks
class BaseChecker class BaseChecker
prepend EE::Gitlab::Checks::BaseChecker prepend EE::Gitlab::Checks::BaseChecker # rubocop: disable Cop/InjectEnterpriseEditionModule
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
attr_reader :change_access attr_reader :change_access
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module Checks module Checks
class ChangeAccess class ChangeAccess
prepend EE::Gitlab::Checks::ChangeAccess prepend EE::Gitlab::Checks::ChangeAccess # rubocop: disable Cop/InjectEnterpriseEditionModule
ATTRIBUTES = %i[user_access project skip_authorization ATTRIBUTES = %i[user_access project skip_authorization
skip_lfs_integrity_check protocol oldrev newrev ref skip_lfs_integrity_check protocol oldrev newrev ref
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Checks module Checks
class DiffCheck < BaseChecker class DiffCheck < BaseChecker
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
prepend EE::Gitlab::Checks::DiffCheck prepend EE::Gitlab::Checks::DiffCheck # rubocop: disable Cop/InjectEnterpriseEditionModule
LOG_MESSAGES = { LOG_MESSAGES = {
validate_file_paths: "Validating diffs' file paths...", validate_file_paths: "Validating diffs' file paths...",
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module Ci module Ci
module Parsers module Parsers
prepend ::EE::Gitlab::Ci::Parsers prepend ::EE::Gitlab::Ci::Parsers # rubocop: disable Cop/InjectEnterpriseEditionModule
ParserNotFoundError = Class.new(ParserError) ParserNotFoundError = Class.new(ParserError)
......
...@@ -20,7 +20,7 @@ module Gitlab ...@@ -20,7 +20,7 @@ module Gitlab
private_constant :REASONS private_constant :REASONS
prepend ::EE::Gitlab::Ci::Status::Build::Failed prepend ::EE::Gitlab::Ci::Status::Build::Failed # rubocop: disable Cop/InjectEnterpriseEditionModule
def status_tooltip def status_tooltip
base_message base_message
......
...@@ -12,7 +12,7 @@ module Gitlab ...@@ -12,7 +12,7 @@ module Gitlab
MAX_TIMESTAMP_VALUE = Time.at((1 << 31) - 1).freeze MAX_TIMESTAMP_VALUE = Time.at((1 << 31) - 1).freeze
class << self class << self
prepend EE::Gitlab::Database prepend EE::Gitlab::Database # rubocop: disable Cop/InjectEnterpriseEditionModule
end end
def self.config def self.config
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module Email module Email
module Handler module Handler
prepend ::EE::Gitlab::Email::Handler prepend ::EE::Gitlab::Email::Handler # rubocop: disable Cop/InjectEnterpriseEditionModule
def self.handlers def self.handlers
@handlers ||= load_handlers @handlers ||= load_handlers
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module EtagCaching module EtagCaching
class Router class Router
prepend EE::Gitlab::EtagCaching::Router prepend EE::Gitlab::EtagCaching::Router # rubocop: disable Cop/InjectEnterpriseEditionModule
Route = Struct.new(:regexp, :name) Route = Struct.new(:regexp, :name)
# We enable an ETag for every request matching the regex. # We enable an ETag for every request matching the regex.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# class return an instance of `GitlabAccessStatus` # class return an instance of `GitlabAccessStatus`
module Gitlab module Gitlab
class GitAccess class GitAccess
prepend ::EE::Gitlab::GitAccess prepend ::EE::Gitlab::GitAccess # rubocop: disable Cop/InjectEnterpriseEditionModule
include ActionView::Helpers::SanitizeHelper include ActionView::Helpers::SanitizeHelper
include PathLocksHelper include PathLocksHelper
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Gitlab module Gitlab
class GitAccessWiki < GitAccess class GitAccessWiki < GitAccess
prepend EE::Gitlab::GitAccessWiki prepend EE::Gitlab::GitAccessWiki # rubocop: disable Cop/InjectEnterpriseEditionModule
ERROR_MESSAGES = { ERROR_MESSAGES = {
read_only: "You can't push code to a read-only GitLab instance.", read_only: "You can't push code to a read-only GitLab instance.",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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