[GH-ISSUE #137] Cannot set ACL on ObjectHandle #2174

Closed
opened 2026-03-15 17:51:34 +03:00 by kerem · 1 comment
Owner

Originally created by @henrahmagix on GitHub (Nov 19, 2019).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/137

With latest v1.14.1:

err = obj.ACL().Set(gs.ctx, storage.AllUsers, storage.RoleReader)
// err.Error() == "json: cannot unmarshal string into Go struct field Object.acl of type []*storage.ObjectAccessControl"

This code is very similar to an example taken from the cloud.google.com/go/storage docs, so I feel like it should be supported: https://godoc.org/cloud.google.com/go/storage#ACLHandle.Set

Originally created by @henrahmagix on GitHub (Nov 19, 2019). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/137 With latest v1.14.1: ```go err = obj.ACL().Set(gs.ctx, storage.AllUsers, storage.RoleReader) // err.Error() == "json: cannot unmarshal string into Go struct field Object.acl of type []*storage.ObjectAccessControl" ``` This code is very similar to an example taken from the `cloud.google.com/go/storage` docs, so I feel like it should be supported: https://godoc.org/cloud.google.com/go/storage#ACLHandle.Set
kerem 2026-03-15 17:51:34 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@fsouza commented on GitHub (Feb 15, 2021):

Looks like this is fixed in #125. Feel free to reopen otherwise.

<!-- gh-comment-id:779482364 --> @fsouza commented on GitHub (Feb 15, 2021): Looks like this is fixed in #125. Feel free to reopen otherwise.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#2174
No description provided.