mirror of
https://github.com/discourse/discourse.git
synced 2025-02-24 06:27:24 +08:00

Followup to 978d52841af23c0709bb646ba3ca91a5e6e7ce64 It's complicated...we have multiple "anonymous" user concepts in core, and even two classes called the exact same thing -- AnonymousUser. The first case is Guardian::AnonymousUser, which is used for people who are browsing the forum without being authenticated. The second case is the model AnonymousUser, which is used when a user is liking or posting anonymously via allow_anonymous_likes or allow_anonymous_posting site settings. We will untangle this naming nightmare later on...but for the time being, only authenticated users who are pretending to be anonymous should be able to like posts if allow_anonymous_likes is on.