A platform for community discussion. Free, open, simple.
DEV: correct edge case introduced in 333b5a19
Sam Saffron39b856dce720
diff --git a/lib/guardian/topic_guardian.rb b/lib/guardian/topic_guardian.rbindex d52c1e7a99a..941d76e166e 100644--- a/lib/guardian/topic_guardian.rb+++ b/lib/guardian/topic_guardian.rb@@ -76,7 +76,14 @@ module TopicGuardianreturn true if is_moderator? && can_create_post?(topic)# can't edit topics in secured categories where you don't have permission to create topics- return false if !can_create_topic_on_category?(topic.category)+ # except for a tiny edge case where the topic is uncategorized and you are trying+ # to fix it but uncategorized is disabled+ if (+ SiteSetting.allow_uncategorized_topics ||+ topic.category_id != SiteSetting.uncategorized_category_id+ )+ return false if !can_create_topic_on_category?(topic.category)+ end# TL4 users can edit archived topics, but can not edit private messagesreturn true if (