diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/profiles/notifications_controller.rb | 2 | ||||
-rw-r--r-- | app/finders/design_management/designs_finder.rb | 5 | ||||
-rw-r--r-- | app/graphql/mutations/design_management/move.rb | 4 | ||||
-rw-r--r-- | app/models/design_management/design.rb | 14 | ||||
-rw-r--r-- | app/models/project_statistics.rb | 1 | ||||
-rw-r--r-- | app/policies/project_policy.rb | 9 | ||||
-rw-r--r-- | app/services/design_management/move_designs_service.rb | 1 |
7 files changed, 6 insertions, 30 deletions
diff --git a/app/controllers/profiles/notifications_controller.rb b/app/controllers/profiles/notifications_controller.rb index 6ba32fd45b3..5a55e0e9e4e 100644 --- a/app/controllers/profiles/notifications_controller.rb +++ b/app/controllers/profiles/notifications_controller.rb @@ -35,6 +35,6 @@ class Profiles::NotificationsController < Profiles::ApplicationController private def user_groups - GroupsFinder.new(current_user).execute.order_name_asc.page(params[:page]).per(NOTIFICATIONS_PER_PAGE) + GroupsFinder.new(current_user, all_available: false).execute.order_name_asc.page(params[:page]).per(NOTIFICATIONS_PER_PAGE) end end diff --git a/app/finders/design_management/designs_finder.rb b/app/finders/design_management/designs_finder.rb index 6673103e146..857b828dc47 100644 --- a/app/finders/design_management/designs_finder.rb +++ b/app/finders/design_management/designs_finder.rb @@ -22,10 +22,7 @@ module DesignManagement items = by_visible_at_version(items) items = by_filename(items) items = by_id(items) - - # TODO: We don't need to pass the project anymore after the feature flag is removed - # https://gitlab.com/gitlab-org/gitlab/-/issues/34382 - items.ordered(issue.project) + items.ordered end private diff --git a/app/graphql/mutations/design_management/move.rb b/app/graphql/mutations/design_management/move.rb index 0b654447844..6126af8b68b 100644 --- a/app/graphql/mutations/design_management/move.rb +++ b/app/graphql/mutations/design_management/move.rb @@ -20,10 +20,6 @@ module Mutations null: true, description: "The current state of the collection" - def ready(*) - raise ::Gitlab::Graphql::Errors::ResourceNotAvailable unless ::Feature.enabled?(:reorder_designs, default_enabled: true) - end - def resolve(**args) service = ::DesignManagement::MoveDesignsService.new(current_user, parameters(args)) diff --git a/app/models/design_management/design.rb b/app/models/design_management/design.rb index deda814d689..57bb250829d 100644 --- a/app/models/design_management/design.rb +++ b/app/models/design_management/design.rb @@ -79,16 +79,10 @@ module DesignManagement joins(join.join_sources).where(actions[:event].not_eq(deletion)) end - scope :ordered, -> (project) do - # TODO: Always order by relative position after the feature flag is removed - # https://gitlab.com/gitlab-org/gitlab/-/issues/34382 - if Feature.enabled?(:reorder_designs, project, default_enabled: true) - # We need to additionally sort by `id` to support keyset pagination. - # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17788/diffs#note_230875678 - order(:relative_position, :id) - else - in_creation_order - end + scope :ordered, -> do + # We need to additionally sort by `id` to support keyset pagination. + # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17788/diffs#note_230875678 + order(:relative_position, :id) end scope :in_creation_order, -> { reorder(:id) } diff --git a/app/models/project_statistics.rb b/app/models/project_statistics.rb index 55934e08238..67ab2c0ce8a 100644 --- a/app/models/project_statistics.rb +++ b/app/models/project_statistics.rb @@ -23,7 +23,6 @@ class ProjectStatistics < ApplicationRecord scope :for_project_ids, ->(project_ids) { where(project_id: project_ids) } scope :for_namespaces, -> (namespaces) { where(namespace: namespaces) } - scope :with_any_ci_minutes_used, -> { where.not(shared_runners_seconds: 0) } def total_repository_size repository_size + lfs_objects_size diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index b2432bfa608..b9f5cd74782 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -102,11 +102,6 @@ class ProjectPolicy < BasePolicy end with_scope :subject - condition(:moving_designs_disabled) do - !::Feature.enabled?(:reorder_designs, @subject, default_enabled: true) - end - - with_scope :subject condition(:service_desk_enabled) { @subject.service_desk_enabled? } # We aren't checking `:read_issue` or `:read_merge_request` in this case @@ -557,10 +552,6 @@ class ProjectPolicy < BasePolicy prevent :move_design end - rule { moving_designs_disabled }.policy do - prevent :move_design - end - rule { read_package_registry_deploy_token }.policy do enable :read_package enable :read_project diff --git a/app/services/design_management/move_designs_service.rb b/app/services/design_management/move_designs_service.rb index de763caba2f..ca715b10351 100644 --- a/app/services/design_management/move_designs_service.rb +++ b/app/services/design_management/move_designs_service.rb @@ -13,7 +13,6 @@ module DesignManagement def execute return error(:no_focus) unless current_design.present? - return error(:cannot_move) unless ::Feature.enabled?(:reorder_designs, project, default_enabled: true) return error(:cannot_move) unless current_user.can?(:move_design, current_design) return error(:no_neighbors) unless neighbors.present? return error(:not_distinct) unless all_distinct? |