Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r--app/models/snippet.rb12
1 files changed, 0 insertions, 12 deletions
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')