-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ref(uptime): Restrict detector mode changes to superusers only #103178
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
ref(uptime): Restrict detector mode changes to superusers only #103178
Conversation
wedamija
left a comment
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.
Also, when a user modifies a detector, it should automatically switch to manual mode, from what I remember
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #103178 +/- ##
===========================================
- Coverage 80.67% 80.66% -0.01%
===========================================
Files 9241 9241
Lines 393627 393640 +13
Branches 25053 25053
===========================================
+ Hits 317542 317548 +6
- Misses 75623 75630 +7
Partials 462 462 |
Let me verify we have a test for this behavior |
Adds validation to prevent non-superusers from creating or modifying uptime detectors with restricted mode values (AUTO_DETECTED_*). Only superusers (internal systems) can now set modes other than MANUAL. The validation smartly only triggers when mode is being changed, allowing users to pass config with an unchanged mode value. Fixes [NEW-621: Ensure Uptime detector `mode` is not configurable via API endpoints](https://linear.app/getsentry/issue/NEW-621/ensure-uptime-detector-mode-is-not-configurable-via-api-endpoints)
30eb4f9 to
fbd03bd
Compare
Adds validation to prevent non-superusers from creating or modifying uptime detectors with restricted mode values (AUTO_DETECTED_*). Only superusers (internal systems) can now set modes other than MANUAL. The validation smartly only triggers when mode is being changed, allowing users to pass config with an unchanged mode value. Fixes [NEW-621: Ensure Uptime detector `mode` is not configurable via API endpoints](https://linear.app/getsentry/issue/NEW-621/ensure-uptime-detector-mode-is-not-configurable-via-api-endpoints)
Adds validation to prevent non-superusers from creating or modifying uptime detectors with restricted mode values (AUTO_DETECTED_*). Only superusers (internal systems) can now set modes other than MANUAL. The validation smartly only triggers when mode is being changed, allowing users to pass config with an unchanged mode value. Fixes [NEW-621: Ensure Uptime detector `mode` is not configurable via API endpoints](https://linear.app/getsentry/issue/NEW-621/ensure-uptime-detector-mode-is-not-configurable-via-api-endpoints)
Adds validation to prevent non-superusers from creating or modifying
uptime detectors with restricted mode values (AUTO_DETECTED_*). Only
superusers (internal systems) can now set modes other than MANUAL.
The validation smartly only triggers when mode is being changed, allowing
users to pass config with an unchanged mode value.
Fixes NEW-621: Ensure Uptime detector
modeis not configurable via API endpoints