Skip to content

blob.acl.save_predefined() only works for private #1659

Description

@pdknsk

From the documentation.

Must be one of the keys in _PREDEFINED_ACLS

_PREDEFINED_ACLS=frozenset([
"private",
"project-private",
"public-read",
"public-read-write",
"authenticated-read",
"bucket-owner-read",
"bucket-owner-full-control",
])

Let's try.

>>>blob.acl.save_predefined('public-read')
...
gcloud.exceptions.BadRequest: 400Invalidstringvalue: 'public-read'. Allowedvalues: [authenticatedread, bucketownerfullcontrol, bucketownerread, private, projectprivate, publicread]
>>>blob.acl.save_predefined('publicread')
...
ValueError: InvalidpredefinedACL: publicread

Coincidentally, the tests only try private.

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions