## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

Now works
http://localhost:3000/rest/project/clone/webstudiois

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
This commit is contained in:
Ivan Starkov authored and GitHub committed 2023-02-16 15:17:23 +03:00
1 parent 89a95c468b
commit b652e2163c
1 file changed
+11
@@ -48,6 +48,17 @@ export const hasProjectPermit = async (
return true;
}
// Allow load webstudiois for clone
// @todo Rethink permissions for this use-case
// The plan is to make new permission for projects which are allowed to be publicly clonable by anyone
// https://github.com/webstudio-is/webstudio-builder/issues/1038
if (
props.permit === "view" &&
props.projectId === "62154aaef0cb0860ccf85d6e"
) {
return true;
}
// Edge-case to allow access the project on the canvas
if (
props.permit === "view" &&