mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 05:26:24 +09:00
## Description 1. What is this PR about (link the issue and add a short description) In view mode, we need to prevent users from deleting / creating assets in UI. (Server-side protection already done in the previous PR) The other way can be just to hide buttons from the UI. Also tooltip duration for disabled actions can be smaller. ## Steps for reproduction Share the Link with View permissions. Open that link in incognito mode. Try to create/delete an asset <img width="265" alt="image" src="https://user-images.githubusercontent.com/5077042/216938724-d8e0e3b3-28fe-405e-8997-0a8dd84a105e.png"> <img width="355" alt="image" src="https://user-images.githubusercontent.com/5077042/216938784-a1a59926-b41e-4193-8584-8387cae221f6.png"> <img width="263" alt="image" src="https://user-images.githubusercontent.com/5077042/216939092-13d59ddd-c601-4ebb-b536-d7c0bd4a572a.png"> <img width="308" alt="image" src="https://user-images.githubusercontent.com/5077042/216940665-f185e9b7-84c3-4ad7-8c61-43b3447a5777.png"> ## 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-designer/blob/main/apps/designer/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `designer/env-check.js` if mandatory