fix: omit creator email from v2 asset responses - #249
Merged
stefan-ernst merged 1 commit intoSep 9, 2026
Conversation
Contributor
|
Thank you, good find! Still working on corrections for v2 api, this is a useful one |
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.
API-v2 asset responses include the creator's email even when the bearer token cannot access the user API. V1 deliberately omitted this information from assets.
This restores that boundary for asset creation, detail reads, updates and lists. Both V2 mounts use the same representation. Creator identity and other asset fields remain available; the email must be obtained through the separately permission-checked user API. Single-asset response redaction copies the model instead of changing service-owned state.
The HTTP regression fails on Core
cbd4f521for all four operations on both mounts and passes with this fix. It uses synthetic accounts, verifies a nonempty source email, confirms that the asset-only token cannot read/users/me, and checks that asset identity survives redaction.All nine retained V1 scenarios remain covered, alongside V2 equivalents and outsider, Viewer, Editor and Administrator checks with persisted outcomes. The asset/CLI-asset subset passes on SQLite and PostgreSQL with this branch.
Tests are in the companion test branch. Kept in draft alongside the ongoing API-v2 test migration. No production instance was accessed.