[PR #498] [MERGED] added POST endpoint for acls #659

Closed
opened 2026-03-03 12:31:03 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/498
Author: @dpoetzsch
Created: 5/18/2021
Status: Merged
Merged: 5/19/2021
Merged by: @fsouza

Base: mainHead: acl-post


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 fakestorage/server.go (+1 -0)

📄 Description

Besides the PATCH for object-level ACLs, there is also a POST: https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert

It is called for example by the nodeJS lib when calling file.makePublic().

I added the endpoint and reused the PATCH code. I suspect the code is actually correct for POST but might be incomplete for PATCH. Anyhow, with this PR file.makePublic() works like a charm.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/498 **Author:** [@dpoetzsch](https://github.com/dpoetzsch) **Created:** 5/18/2021 **Status:** ✅ Merged **Merged:** 5/19/2021 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `acl-post` --- ### 📝 Commits (1) - [`28d41d1`](https://github.com/fsouza/fake-gcs-server/commit/28d41d1f2620e2c1f53254070164e38ba70cb202) added POST endpoint for acls, see https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/server.go` (+1 -0) </details> ### 📄 Description Besides the `PATCH` for object-level ACLs, there is also a `POST`: https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert It is called for example by the nodeJS lib when calling `file.makePublic()`. I added the endpoint and reused the `PATCH` code. I suspect the code is actually correct for `POST` but might be incomplete for `PATCH`. Anyhow, with this PR `file.makePublic()` works like a charm. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:31:03 +03:00
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#659
No description provided.