- Create a Content Selector
- Create a Repository Content Selector privilege with the above CS
- Delete the Content Selector
The privilege created in step 2 gets the CS removed and now is in inconsistent state as the CS is required to be present.
- When a content selector is used by a content selector permission, show a warning message in the content selector detail screen, saying that the content selector is in use and cannot be deleted (use the blob store feature as a template, screenshot attached).
- Show the number of content selector permissions that it is used by (e.g. “This content selector is in use by 6 permissions and cannot be deleted”)
- Add hover text which shows the list of content selector permissions that are blocking deletion (if performant)
- Prevent people from deleting a content selector that is in use by at least one content selector permission