discourse/plugins/discourse-cakeday/spec/serializers
Régis HANOL b554ecc352
FIX: Cakeday birthdate not visible to users with hidden profiles (#39129)
When a user has "hide profile" enabled, the cakeday serializer include
conditions excluded birthdate and cakedate entirely — even when the user
was viewing their own profile or preferences.

This meant saving a birthday appeared to work, but the field showed up
empty on page reload because the serializer stripped it from the
response.

The fix adds a self-view bypass (`scope.user.id == object.id`) to all
four serializer include conditions (user, user_card, and post
serializers) so users always see their own cakeday data regardless of
their hide_profile setting. Other users still cannot see it.

https://meta.discourse.org/t/38447/232
2026-04-07 16:41:08 +02:00
..
post_serializer_spec.rb FIX: Cakeday birthdate not visible to users with hidden profiles (#39129) 2026-04-07 16:41:08 +02:00
user_serializer_spec.rb FIX: Cakeday birthdate not visible to users with hidden profiles (#39129) 2026-04-07 16:41:08 +02:00