mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
BUGFIX: JS error when login_required is enabled
This commit is contained in:
@@ -58,16 +58,14 @@ class Site
|
||||
def self.cached_json(guardian)
|
||||
|
||||
if guardian.anonymous? && SiteSetting.login_required
|
||||
return {}.to_json
|
||||
return {
|
||||
periods: TopTopic.periods.map(&:to_s),
|
||||
filters: Discourse.filters.map(&:to_s),
|
||||
}.to_json
|
||||
end
|
||||
|
||||
# Sam: bumping this way down, SiteSerializer will serialize post actions as well,
|
||||
# On my local this was not being flushed as post actions types changed, it turn this
|
||||
# broke local.
|
||||
site = Site.new(guardian)
|
||||
#Discourse.cache.fetch(site.cache_key, family: "site", expires_in: 1.minute) do
|
||||
MultiJson.dump(SiteSerializer.new(site, root: false))
|
||||
#end
|
||||
end
|
||||
|
||||
def self.invalidate_cache
|
||||
|
||||
Reference in New Issue
Block a user