planet-webapp
planet-webapp copied to clipboard
TPO get error message trying to view own project
Describe the bug When a TPO edits its own project list and hits the view button for a project which is not yet published, the project page is opened anyway and the backend API call, e.g. https://app-staging.plant-for-the-planet.org/app/projects/proj_gRViAXiyyV3ZpGdpD472Fhqd?_scope=extended¤cy=EUR answers with a 404 error.
Is it on a Production or Development Build? production & develop
To Reproduce Steps to reproduce the behavior:
- Login as TPO
- Goto own projects list
- Click on 'view' for a none published project
- See error
Expected behavior Either disable 'view' button for non published project or build a special preview for projects for the project owner with authorized API calls checking the ownership of the project to display.
What actually happens The project page is opened and the API call fails with 404.
Screenshots
Desktop (please complete the following information):
- OS: latest MacOS
- Browser: latest Chrome, Safari