Sharing backend: shares CRUD + ACL enforcement everywhere (#16)
Build image / build-and-push (push) Successful in 4s

Co-authored-by: Steve Dudenhoeffer <[email protected]>
This commit was merged in pull request #35.
This commit is contained in:
2026-07-19 03:49:54 +00:00
committed by steve
parent 48ba08e8f2
commit 2a86f87b50
11 changed files with 733 additions and 24 deletions
+6
View File
@@ -84,6 +84,12 @@ func New(cfg *config.Config, svc *service.Service) *gin.Engine {
gardens.GET("/:id/full", h.getGardenFull) // one-shot editor load
gardens.POST("/:id/objects", h.createObject)
// Sharing (owner-managed; a recipient may remove their own share).
gardens.GET("/:id/shares", h.listShares)
gardens.POST("/:id/shares", h.addShare)
gardens.PATCH("/:id/shares/:userId", h.updateShare)
gardens.DELETE("/:id/shares/:userId", h.removeShare)
// Objects are addressed by their own id; the service resolves the owning
// garden for the permission check.
objects := v1.Group("/objects", h.requireAuth())