Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't delete area if climbs.length == 0 #1274

Open
strukturart opened this issue Feb 10, 2025 · 3 comments
Open

Can't delete area if climbs.length == 0 #1274

strukturart opened this issue Feb 10, 2025 · 3 comments

Comments

@strukturart
Copy link

Steps to Reproduce

the trash can for deletion is grayed out but the area does not contain any climbs or subareas
https://openbeta.io/area/767bb0be-f538-42de-a302-6aaaafa8ce7b/plagne
https://openbeta.io/editArea/ba79dd6f-bab4-52f7-a39d-04b0bde66925/general

Expected Behavior

if(areas has not children) delete ok

Browser & version

current Chrome

Operating system

Linux

@greghart
Copy link
Contributor

I'd be interested in taking this one, however I'm getting an unauthorized error when attempting to add an empty area in staging to test against.

Image

Seems like you need the editor role to reproduce this? My staging user is fascinating_violet_gorilla if I can get that setup.

Also, I thought I'd be able to bypass the authorization locally, but realized you need to be authenticated to even access the page, so I believe I'd also need an auth0 key per API key errors section in the readme, since you must be logged in.

@vnugent
Copy link
Contributor

vnugent commented Feb 24, 2025

@greghart everyone has editing role by default. Once you have .env.local file (I just emailed you), you should be able to edit.

@greghart
Copy link
Contributor

Perfect, thank you for the env vars. Interestingly even on staging instance (https://stg.openbeta.io/) I'm getting that error, not sure why.

In either case, was able to authorize locally with LOCAL_DEV_BYPASS_AUTH mode, and can confirm I was unable to reproduce this issue. Saw that expected behavior occurred, empty area was able to be deleted

Image

Also the original linked area for this issue is no longer present in production, guessing it was able to be deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants