mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
security: when login is required don't return the site node in the preload store
This commit is contained in:
parent
634e764707
commit
cf08d2c751
@ -55,6 +55,11 @@ class Site
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.cached_json(guardian)
|
def self.cached_json(guardian)
|
||||||
|
|
||||||
|
if guardian.anonymous? && SiteSetting.login_required
|
||||||
|
return {}.to_json
|
||||||
|
end
|
||||||
|
|
||||||
# Sam: bumping this way down, SiteSerializer will serialize post actions as well,
|
# 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
|
# On my local this was not being flushed as post actions types changed, it turn this
|
||||||
# broke local.
|
# broke local.
|
||||||
|
Loading…
Reference in New Issue
Block a user