Raw error when attempting to delete unused environment
Clicking the delete icon next to an unused environment in my team project prompts me for my 2FA code. When I enter it, the following message briefly appears in red inline in the page:
Is this an actual permissions problem or a bug? The way the message is presented makes it seem to be a bug.
8 Replies
Project ID:
14860a72-1ba1-4e38-9c2c-78dd0c13e288
@Angelo - error when attempting to delete unused environment
Flagging this thread. A team member will be with you shortly.
Quickly tagging in @gimenete
Looks like it's an authorization error not formatted correctly in the UI.
Does it happen in any environment or just a specific one?
According to the code only admin members can delete environments. I'll hide the trash can button if the current user is not an admin. Is that your case?
Yes, that is the case
Ok, from now on only admins will see the delete button.
The main reason we are limiting it to admins is that we don't know if the environment to be deleted is the production one. We don't want to guess it by the name. One thing we could do is have some kind of protection rule on the production environment and allow non-admin users to delete any other environment that is not marked as production. What do you think?
If you want what works out of the box for the most people, just limiting deletion to admins makes sense.