FIX: Disallow featuring hidden topics (#8814)

This commit is contained in:
Mark VanLandingham
2020-01-30 10:00:49 -06:00
committed by GitHub
parent dc34c24ffe
commit 089d38e9d3
4 changed files with 21 additions and 4 deletions
+1
View File
@@ -127,6 +127,7 @@ module UserGuardian
def can_feature_topic?(user, topic)
return false if !SiteSetting.allow_featured_topic_on_user_profiles?
return false if !is_me?(user) && !is_staff?
return false if !topic.visible
return false if topic.read_restricted_category? || topic.private_message?
true
end