-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix(aci): prevent deletion of system-created monitors in UI #103838
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
fix(aci): prevent deletion of system-created monitors in UI #103838
Conversation
|
we should probably do this in the api too, right? I can if you're not planning it. |
|
@kcons making the backend PR now! |
| const [allInQuerySelected, setAllInQuerySelected] = useState(false); | ||
| const anySelected = selected.size > 0; | ||
|
|
||
| const canDelete = canEdit && !hasSystemCreatedDetectors; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Delete enabled for query with system-created monitors
When using "Select all X monitors that match this search query", the canDelete check only considers system-created monitors on the current page. If the current page has only user-created monitors but other pages in the query results contain system-created monitors, the Delete button remains enabled. Clicking Delete would then attempt to delete all monitors matching the query, including system-created ones on other pages, bypassing the intended protection.
system-created monitors should not be deleted by anyone, regardless of permissions backend fix to go with #103838 closes https://linear.app/getsentry/issue/NEW-646/prevent-api-from-deleting-error-monitor-detectors-via-bulk-edit
system-created monitors should not be deleted by anyone, regardless of permissions
closes https://linear.app/getsentry/issue/NEW-647/disable-bulk-delete-in-ui-when-selection-includes-error-monitors