I need to update the ACL basically by adding or removing the allUsers entity.
I have the PHP library and what I'm doing at moment is:
$storage = new StorageClient([
'projectId' => "xxxxx",
'keyFilePath' => mykey,
]);
$bucket = $storage->bucket('mybucket');
$acl = $bucket->acl('objectAccessControls', 'path/file/on/bucket');
if(add){
$acl->add('allUsers', 'READER');
}else{
$acl->delete('allUsers');
}
With this code actually changes ALL bucket configuration, not the file only.
How can I correctly specify the path of a specific file and change permissions only on path/file/on/bucket? I'm using the wrong functions?
Here the documentation that I'm using https://googleapis.github.io/google-cloud-php/#/docs/google-cloud/v0.90.0/storage/acl
UPDATE 1: Using this to delete seems working -> https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/delete
Tried to include the parameters listed here to the call I do, something like this:
$options = ['object' => 'path/obj'];
$acl->delete('allUsers', $options)
Still not working

