mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: opt-in guidance on topics for users without access (#7852)
Co-Authored-By: majakomel <maja.komel@gmail.com> Co-Authored-By: Robin Ward <robin.ward@gmail.com>
This commit is contained in:
@@ -159,6 +159,10 @@ module TopicGuardian
|
||||
can_see_topic?(topic, false)
|
||||
end
|
||||
|
||||
def can_get_access_to_topic?(topic)
|
||||
topic&.access_topic_via_group.present? && authenticated?
|
||||
end
|
||||
|
||||
def filter_allowed_categories(records)
|
||||
unless is_admin?
|
||||
allowed_ids = allowed_category_ids
|
||||
|
||||
Reference in New Issue
Block a user