mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Allow TL4 users to see unlisted topics (#19890)
TL4 users can already list and unlist topics, but they can't see the unlisted topics. This change brings this to par by allowing TL4 users to also see unlisted topics.
This commit is contained in:
@@ -277,6 +277,10 @@ module TopicGuardian
|
||||
)
|
||||
end
|
||||
|
||||
def can_see_unlisted_topics?
|
||||
is_staff? || @user.has_trust_level?(TrustLevel[4])
|
||||
end
|
||||
|
||||
def can_get_access_to_topic?(topic)
|
||||
topic&.access_topic_via_group.present? && authenticated?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user