FIX: Don't preload unless the plugin is enabled
This commit is contained in:
parent
856c5a5435
commit
7720ceed24
|
|
@ -41,6 +41,7 @@ after_initialize do
|
|||
end
|
||||
|
||||
TopicList.on_preload do |topics, topic_list|
|
||||
if SiteSetting.assign_enabled?
|
||||
is_staff = topic_list.current_user && topic_list.current_user.staff?
|
||||
allowed_access = SiteSetting.assigns_public || is_staff
|
||||
|
||||
|
|
@ -63,6 +64,7 @@ after_initialize do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require_dependency 'topic_query'
|
||||
TopicQuery.add_custom_filter(:assigned) do |results, topic_query|
|
||||
|
|
|
|||
Loading…
Reference in New Issue