Skip to content

Commit

Permalink
Add missing ACL ops handling
Browse files Browse the repository at this point in the history
Signed-off-by: Ben <[email protected]>
  • Loading branch information
Neon-White committed Mar 12, 2024
1 parent 324d7f6 commit e7d6cea
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/sdk/namespace_gcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,15 +429,22 @@ class NamespaceGCP {
//////////
// ACLs //
//////////

/*
NooBaa does not support ACLs - not for buckets, nor objects.
However, some S3 clients fail to function entirely without a valid response to execution of ACL operations.
Thus, we opted to implement a faux-support for the operation - enough to allow the clients to work, but still without supporting ACLs.
The reason that read_object_md() is used, is to allow potential errors to rise up if necessary -
for example, if the user tries to interact with an object that does not exist, the operation would fail as expected with NoSuchObject.
*/
async get_object_acl(params, object_sdk) {
dbg.log0('NamespaceGCP.get_object_acl:', this.bucket, inspect(params));
throw new S3Error(S3Error.NotImplemented);
await this.read_object_md(params, object_sdk);
return s3_utils.DEFAULT_OBJECT_ACL;
}

async put_object_acl(params, object_sdk) {
dbg.log0('NamespaceGCP.put_object_acl:', this.bucket, inspect(params));
throw new S3Error(S3Error.NotImplemented);
await this.read_object_md(params, object_sdk);
}

///////////////////
Expand Down

0 comments on commit e7d6cea

Please sign in to comment.