feat: honor destinationPredefinedAcl on object copy and compose - #2310
Open
gaul wants to merge 1 commit into
Open
feat: honor destinationPredefinedAcl on object copy and compose#2310gaul wants to merge 1 commit into
gaul wants to merge 1 commit into
Conversation
objects.copy, objects.rewrite and objects.compose all accept a destinationPredefinedAcl, and the real API applies it to the object they produce. Neither handler read it: a rewrite gave the destination the source object's ACL, and a compose left whatever CreateObject assigns, so a client asking for a public destination got a private one and no error. Take it from the query string in both, mapping it through the existing getObjectACL, which is what the upload paths already do for predefinedAcl. A rewrite with no destination ACL keeps inheriting the source's, and a compose without one keeps whatever it had, so the default in each is unchanged. Composing needs the ACL at the point the destination is built, so it joins the attributes ComposeObject already carries. The gRPC compose passes nil: it forwards none of the destination attributes today, and wiring only the ACL would leave it the odd one out. Objects uploaded through /upload already had this; copying and composing them did not.
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.
objects.copy, objects.rewrite and objects.compose all accept a destinationPredefinedAcl, and the real API applies it to the object they produce. Neither handler read it: a rewrite gave the destination the source object's ACL, and a compose left whatever CreateObject assigns, so a client asking for a public destination got a private one and no error.
Take it from the query string in both, mapping it through the existing getObjectACL, which is what the upload paths already do for predefinedAcl. A rewrite with no destination ACL keeps inheriting the source's, and a compose without one keeps whatever it had, so the default in each is unchanged.
Composing needs the ACL at the point the destination is built, so it joins the attributes ComposeObject already carries. The gRPC compose passes nil: it forwards none of the destination attributes today, and wiring only the ACL would leave it the odd one out.
Objects uploaded through /upload already had this; copying and composing them did not.