Tags: OpenStackweb/openstackid
Tags
Feature/add expands fields relations to get user by id v2 (#148) * 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.
fix(ui): unverified user (#122) * fix(ui): unverified user * fix(auth): null check before calling getId() in verifyEmail Split combined null/inactive check into separate guards to prevent "Call to a member function getId() on null" when no user is found for the verification token.
fix: move hyphen to end of password validation regex character class (#… …102) * fix: move hyphen to end of password validation regex character class The hyphen character was positioned between * and + in the regex character class [#?!@$%^&*-+], causing it to be interpreted as a range operator (ASCII 42-43) instead of a literal hyphen (ASCII 45). This caused passwords containing hyphens to fail validation while passwords with asterisks passed. Moving the hyphen to the end of the character class [#?!@$%^&*+-] ensures it is treated as a literal character. Regression introduced in 757e964. Co-Authored-By: Claude Opus 4.5 <[email protected]> * chore: add regresion test --------- Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: smarcet <[email protected]>
fix: move hyphen to end of password validation regex character class (#… …102) * fix: move hyphen to end of password validation regex character class The hyphen character was positioned between * and + in the regex character class [#?!@$%^&*-+], causing it to be interpreted as a range operator (ASCII 42-43) instead of a literal hyphen (ASCII 45). This caused passwords containing hyphens to fail validation while passwords with asterisks passed. Moving the hyphen to the end of the character class [#?!@$%^&*+-] ensures it is treated as a literal character. Regression introduced in 757e964. Co-Authored-By: Claude Opus 4.5 <[email protected]> * chore: add regresion test --------- Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: smarcet <[email protected]>
PreviousNext