0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/lib/guardian
Isaac Janzen 28b26ca70a
FIX: Enforce public profile visibility in Guardian (#42274)
## Summary

`Guardian#can_see_profile?` did not account for
`hide_user_profiles_from_public`, so anonymous visitors could still read
target-scoped activity, topic, badge, and user-action data through
routes that relied on that predicate.

This change makes `can_see_profile?` enforce the global
anonymous-profile setting. Existing profile, card, and summary routes
retain their explicit forbidden response, while other callers keep their
established not-found behavior. Authenticated behavior is unchanged.

## Source

- Patch Triage: https://patch.discourse.org/patch-triage/1584

Co-authored-by: discourse-patch-triage
<272280883+discourse-patch-triage[bot]@users.noreply.github.com>
2026-08-03 13:59:32 -05:00
..
bookmark_guardian.rb
category_guardian.rb PERF: Speed up category visibility checks (#41977) 2026-07-24 07:53:49 +08:00
ensure_magic.rb
flag_guardian.rb
group_guardian.rb FEATURE: Split setting for allowing mods to manage categories and groups (#35174) 2025-10-06 10:43:42 +03:00
invite_guardian.rb FEATURE: Allow inviting new users directly as admins (#41748) 2026-07-16 14:59:24 -07:00
localization_guardian.rb FIX: Base custom sidebar section translations on their source locale (#42027) 2026-08-03 17:49:42 +02:00
permalink_guardian.rb SECURITY: prevent permalink redirects from leaking restricted slugs 2026-01-28 17:11:14 +00:00
post_guardian.rb FIX: allow category group moderators to view edit history (#37876) 2026-07-24 16:29:06 +02:00
post_revision_guardian.rb SECURITY: Block requests for hidden post revisions through historical version reconstruction (#42269) 2026-08-03 12:27:53 -05:00
sidebar_guardian.rb
staff_action_log_guardian.rb SECURITY: Restrict staff action logs visibility for moderators 2026-01-28 17:11:14 +00:00
tag_guardian.rb FIX: Don't auto-remove chat members from logged_in_users group (#40543) 2026-06-03 18:15:32 +02:00
topic_guardian.rb SECURITY: Scope PM reviewables to their allowed audience 2026-07-28 16:40:22 +02:00
upload_guardian.rb FIX: Enforce secure-upload ACL in AI bot prompt path (#39903) 2026-05-13 09:55:32 +08:00
user_guardian.rb FIX: Enforce public profile visibility in Guardian (#42274) 2026-08-03 13:59:32 -05:00