Add Delete Option to Protected Environments Approval Rules

Problem

Currently for a user to delete an approval rule they will have to open the dropdown and deselect a role or edit a protected environment after creation. This works for the current iteration, but in the future for ease of use, it would be nice to have a trash can to remove rules right in the rule list.

Current Future
Screen_Shot_2022-12-13_at_4.21.45_PM image

From @afontaine !105719 (comment 1205840763):

It turns out the way the access dropdown works for the most part is that it doesn't allow for a two-way binding. It copies initial values internally and then manipulates a different list. Ultimately, this means no trash can without a bit of a refactor. We can look into that later for sure.

Solution:

  • Add the ability to delete a rule into the UI.
Edited by Emily Bauman