Public read-only share link (no login / no OIDC) (#41) (#43)
Build image / build-and-push (push) Successful in 8s
Build image / build-and-push (push) Successful in 8s
Per-garden public read-only link: unauthenticated GET /api/v1/public/gardens/:token (no requireAuth, no OIDC), owner-only enable/rotate/disable, and a /g/$token page rendering GardenCanvas read-only. Review fixes: redact plant owner ids, Cache-Control: no-store, 400 on malformed body, shared resetTransient store action. Closes #41. Co-authored-by: Steve Dudenhoeffer <[email protected]>
This commit was merged in pull request #43.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
-- Per-garden public share token. When set, anyone holding the token may read the
|
||||
-- garden read-only via /api/v1/public/gardens/:token, with no login and no OIDC.
|
||||
-- NULL disables the public link. Unique (over non-NULL values) so a token maps to
|
||||
-- at most one garden; rotating the token invalidates the previous URL.
|
||||
ALTER TABLE gardens ADD COLUMN public_token TEXT;
|
||||
|
||||
CREATE UNIQUE INDEX idx_gardens_public_token ON gardens (public_token) WHERE public_token IS NOT NULL;
|
||||
Reference in New Issue
Block a user