Skip to content

fix(grants): stop serving folders granted by a disabled account - #386

Merged
BryanFRD merged 3 commits into
mainfrom
fix/373-grants-disabled-owner
Oct 25, 2026
Merged

BryanFRD merged 3 commits into
mainfrom
fix/373-grants-disabled-owner

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Join the owner in grants::mount, grants::mounts, grants::received and the search CTE and drop grants whose owner has disabled_at set, matching what public links already do.

Test added in api/tests/grants.rs. It needs DATABASE_URL, so it was not run locally (the harness skips without it); CI runs it.

Closes #373

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The owner filter now covers every read path that uses grantee_email (received, mounts, mount, search). mount still checks for a trashed node through live_node, so leaving out deleted_at on its new nodes join is fine. The test follows the same shape as the existing trashed-folder test.

Nit: the test never calls the received listing endpoint, so that query change has no test coverage.

Separately, the sign-off check fails on this head commit. That is a commit metadata problem, not a code one, but it will probably need fixing before merge.

@BryanFRD
BryanFRD enabled auto-merge (squash) October 25, 2026 10:04
Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
@BryanFRD
BryanFRD force-pushed the fix/373-grants-disabled-owner branch from eb40473 to 4cc9944 Compare October 25, 2026 10:05

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Re-approving on the rebased head. Since f1b1c3b, api/src/grants.rs and api/src/search.rs are unchanged. The only code change is in the test: the Shared with me root listing now expects an empty shelf instead of a 404. That is correct, because the root always exists and the existing shelf test at line 793 asserts it the same way. All three commits now carry a sign-off.

@BryanFRD
BryanFRD merged commit 98095e2 into main Oct 25, 2026
9 checks passed
@BryanFRD
BryanFRD deleted the fix/373-grants-disabled-owner branch October 25, 2026 10:15
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.

fix(grants): stop serving folders granted by a disabled account

1 participant