FIX: Disallow featuring hidden topics (#8814)
This commit is contained in:
committed by
GitHub
parent
dc34c24ffe
commit
089d38e9d3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user