mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-28 07:37:36 +09:00
## Description Removes the hardcoded template-project allowlist from `checkProjectPermit`. Marketplace projects now use their existing viewer authorization tokens, matching how the marketplace passes `authToken` through builder URLs and the builder loader. Token authorization is also scoped to the requested project, so a valid token for one project cannot grant access to another project. ## Changes - Removed the 15-project template allowlist and its unconditional view grant. - Scoped `AuthorizationToken` permit queries by `projectId`. - Added regression coverage for former template IDs, valid viewer tokens, missing tokens, and cross-project token use. - Removed the proposed token backfill and unrelated Prisma schema drift change; existing marketplace tokens remain the source of access. ## Verification - [x] Demonstrated the cross-project regression test fails before the project constraint. - [x] `pnpm --filter @webstudio-is/trpc-interface test -- src/authorize/project.server.test.ts` - [x] `pnpm --filter @webstudio-is/trpc-interface typecheck` - [x] Reviewed documentation impact; no documentation changes are required. - [x] Verified fixture inputs and outputs are not affected. ## Before merging - [x] Made a self-review. - [x] Added regression tests. - [x] Confirmed no environment variables are added. - [ ] Confirm GitHub checks pass. --------- Co-authored-by: Oleg Isonen <oleg008@gmail.com>
trpc-interface
-
trpc-interfacecan implement various TRPC server routers. -
it can act as a proxy for TRPC services implemented in any other apps (those services must have the same API interface).