DEV: Remove unused topic_create_allowed_category_ids (#23463)

This commit is contained in:
Bianca Nenciu 2023-09-08 12:03:22 +03:00 committed by GitHub
parent 26dfb8a489
commit 4db5310135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 11 deletions

View File

@ -1396,10 +1396,6 @@ class User < ActiveRecord::Base
cats.pluck("categories.id").sort cats.pluck("categories.id").sort
end end
def topic_create_allowed_category_ids
Category.topic_create_allowed(self.id).select(:id)
end
# Flag all posts from a user as spam # Flag all posts from a user as spam
def flag_linked_posts_as_spam def flag_linked_posts_as_spam
results = [] results = []

View File

@ -58,9 +58,6 @@ class Guardian
def secure_category_ids def secure_category_ids
[] []
end end
def topic_create_allowed_category_ids
[]
end
def groups def groups
[] []
end end

View File

@ -69,10 +69,6 @@ module CategoryGuardian
end end
end end
def topic_create_allowed_category_ids
@topic_create_allowed_category_ids ||= @user.topic_create_allowed_category_ids
end
def topic_featured_link_allowed_category_ids def topic_featured_link_allowed_category_ids
@topic_featured_link_allowed_category_ids = @topic_featured_link_allowed_category_ids =
Category.where(topic_featured_link_allowed: true).pluck(:id) Category.where(topic_featured_link_allowed: true).pluck(:id)