Repository navigation
feat(file-manager): add download URLs with file access policy - #116
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Author
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Contributor
Author
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.

0 New Issues
0 Fixed Issues
0 Accepted Issues
Add
GET /api/v1/files/{id}/download-url, returningurlandexpiresAtfor an accessible Ready file. The handler loads the aggregate and checksFiles/Policies/FileAccessPolicybefore generating a signed URL.Access rules:
file-manager.personal-files.read.allallows any owner;file-manager.personal-files.read.ownrequires the current user to own the file.file-manager.avatars.read.Register Create/Read/Update/Delete for avatars and both
.ownand.allvariants for personal files: 12 FileManager permissions in total. The Identity data migrationGrantFileManagerPermissionsgrants all 12 to the existing administrative roleDeveloper;Playerreceives personal CRUD.ownand avatar Read. Resolve roles by normalized name, preserve existing assignments and avoid duplicate claims. Rollback preserves granted assignments, following the existing role-seeding convention. CRUD permissions are catalog entries; this change applies the file policy only to download URL retrieval.Core's normal soft-delete filter hides deleted aggregates. Missing or inaccessible files return 404; unavailable user accounts return 401; empty identifiers return 400; accessible uploads that are not Ready return 409. The aggregate's
GetDownloadContentType()validates readiness and a non-null content type; the handler propagates domain errors. Sign URLs using the persisted storage key, file name and validated content type. Clients download directly from S3. URL lifetime comes fromFileManager:S3Storage:PresignedUrlLifetime(15 minutes by default). Signing does not inspect or change S3 content.Application query handlers may return either an
IReadModelor a payload declared by thePANiXiDA.Core.Applicationassembly. Wrapper and collection payloads are checked recursively; read-repository result rules stay unchanged. Return Core'sPresignedDownloadUrldirectly and preserve the HTTP response shape through the presentation mapper.Manual mediator reconciliation uses a separate test collection and host with its recurring schedule disabled. Scheduled reconciliation keeps a separate host with the five-second schedule enabled; its real background processing checks are preserved.
Validation:
CI #769 passed for
0d0c6c2: all test projects, formatting, Helm, coverage/report aggregation and SonarQube quality checks are green.