From 74cb1a1df361969e97d1a85683c1dfca5ac8cad1 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 12 Oct 2023 21:10:53 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/models/snippet.rb | 12 ------------ app/models/users/callout.rb | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) (limited to 'app/models') diff --git a/app/models/snippet.rb b/app/models/snippet.rb index ccdb3b6abc7..d4f8c1b3b0b 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -79,10 +79,6 @@ class Snippet < ApplicationRecord scope :with_statistics, -> { joins(:statistics) } scope :inc_projects_namespace_route, -> { includes(project: [:route, :namespace]) } - scope :without_created_by_banned_user, -> do - where_not_exists(Users::BannedUser.where('snippets.author_id = banned_users.user_id')) - end - attr_mentionable :description participant :author @@ -369,14 +365,6 @@ class Snippet < ApplicationRecord def multiple_files? list_files.size > 1 end - - def hidden_due_to_author_ban? - Feature.enabled?(:hide_snippets_of_banned_users) && author_banned? - end - - def author_banned? - author.banned? - end end Snippet.prepend_mod_with('Snippet') diff --git a/app/models/users/callout.rb b/app/models/users/callout.rb index 60dd89c3ee7..0136cc6bb2d 100644 --- a/app/models/users/callout.rb +++ b/app/models/users/callout.rb @@ -75,8 +75,7 @@ module Users namespace_over_storage_users_combined_alert: 73, # EE-only # 74 removed in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/132751 vsd_feedback_banner: 75, # EE-only - security_policy_protected_branch_modification: 76, # EE-only - vulnerability_report_grouping: 77 # EE-only + security_policy_protected_branch_modification: 76 # EE-only } validates :feature_name, -- cgit v1.2.3