Repository navigation
feat(seed): pin organization membership ids - #174
Merged
Merged
Conversation
[Medium impact] The PR appears safe to merge. SummarySeeded organization memberships can now use a pinned
Since the previous review, only a comma in the documentation heading changed. No new issues or rule violations were found. No previous finding threads were supplied. Reviews (2) · Last reviewed commit: "Fix punctuation in seeding documentation" · Reviewed by Greptile |
Corrected punctuation in section heading about pinning IDs.
Collaborator
|
thanks ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
id, forwarded to the store on insert — the same shape feat(seed): pin organization and user ids #19 added for organizations and users. Omit it and an id is generated as before.PUT/DELETE /user_management/organization_memberships/:idfor a role change or a removal) loses that link on every emulator restart: the seed mints a newom_…id and the stored one points at nothing. Pinned user and organization ids keep logins stable across restarts, but membership-addressed calls still break. We hit this with a PHP OIDC provider (workos-php) pointed at the emulator, which records the membership id at first login and never re-reads it.validateSeedConfigchecks the new field with the existing pinned-id rule (non-empty, URL-safe) and requires it to be unique across the memberships of all organizations, since they share one store collection.docs/seeding.md: the pinning section now covers memberships.Test plan
seed-pinned-ids.spec.ts: a seeded membership with a pinned id is returned by the list (?user_id=), andPUT(role change) andDELETEby that id succeed; validator coverage for an id shared across organizations and for a path delimiter. The three new tests fail without the change.gen:supportedare clean (bun 1.4.2).