Skip to content

feat: referer -> origin fallback - #76

Merged
smarcet merged 1 commit into
mainfrom
feature/whitelist-origin-referer
Jun 16, 2025
Merged

feat: referer -> origin fallback#76
smarcet merged 1 commit into
mainfrom
feature/whitelist-origin-referer

Conversation

@romanetar

Copy link
Copy Markdown
Contributor

Signed-off-by: romanetar <roman_ag@hotmail.com>

@smarcet smarcet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smarcet
smarcet merged commit cb99c77 into main Jun 16, 2025
smarcet added a commit that referenced this pull request Jul 22, 2026
* feat: add fields/relations passthrough to GET /api/v1|v2/users/{id}

Wires SerializerUtils::getExpand()/getFields()/getRelations() into both
by-ID user endpoints (matching the ParametrizedGetAll pattern already
used by list endpoints), and makes PrivateUserSerializer treat `groups`
as a gated relation (mirroring ApiScopeGroupSerializer) instead of
appending it unconditionally.

Unblocks ftn-docsnsklz PR #76 (SDS ftn-attendee-native-realtime-comms.md,
D38): attendee-networking-api's IDP user_updated consumer needs to fetch
exactly fields=public_profile_allow_chat_with_me,first_name,last_name,pic
without pulling the rest of the private profile.

v1 get() also migrated from manual try/catch to the shared
processRequest() wrapper for consistent error handling with getV2().

Also fixes an unrelated pre-existing bug in UserLoginTurnstileTest where
$testEmail/$testPassword being typed as non-nullable string caused a
TypeError before the test's own markTestSkipped() logic could run when
TEST_USER_EMAIL/TEST_USER_PASSWORD are unset.

9 new tests added to OAuth2UserApiTest; full suite green (180 tests,
0 failures, 7 legitimate skips).

* docs(plan): mark spec as VERIFIED

* chore: untrack plan file — plan docs are working artifacts, not committed

* fix: document v1 expand param and add v1 default-shape regression test

Address deep-review findings on PR #148:
- OA\Get annotation for GET /api/v1/users/{id} was missing the `expand`
  parameter even though get() already passed SerializerUtils::getExpand()
  into serialize() -- the capability was live but undocumented.
- v1 lacked a default-shape regression test symmetric with
  testGetUserByIdV2WithNoParamsReturnsSameShapeAsBefore, so the
  fields/relations passthrough's backward compatibility on v1 was only
  exercised incidentally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants