Repository navigation
fix(acl): expose native shared-root r/rw levels for C permission gates - #40
Merged
Merged
Conversation
The native permission seam needs to know whether a qualified share root is r or rw, and probing twice (action=read, then action=write) would double the round trip on every write a share-only account makes. Return `permissions`, aligned with `checks`, alongside the batch verdict. `allowed` and `contract` are unchanged, so the Go fileserver and the C scoped publication keep working and simply ignore the extra field. A denial still answers 403 with no level list, so a caller cannot read a partial answer as an authorization. The contract gains the matching paragraph: the native upload/mkdir/rename/delete gates consume the same share-root exception, and a caller that does not see the field must read it as "cannot qualify" rather than "assume rw".
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.
Purpose
Fix the cross-layer native share-write contract. A user with an explicit V2 directory share and no library membership must receive the exact
rorrwlevel without gaining access to the library root or siblings.Change
/cloudfile/acl/check/includespermissionsaligned with each successfulchecksentry;allowedandcontractstay backward-compatible for Go/C clients.action=writecheck can only pass with effectiverw;ris valid foraction=read, and read-only write attempts return 403 without leaking a partial permission array.Verification
Merge order
Merge this Hub PR before
eaopen/cloudfile-serverandeaopen/cloudfile-dockercompanion PRs.