Skip to content
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(alerts): Prevent muting user alerts #77093

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

schew2381
Copy link
Member

No description provided.

@schew2381 schew2381 requested review from oioki and a team September 6, 2024 17:57
@schew2381 schew2381 self-assigned this Sep 6, 2024
@schew2381 schew2381 requested a review from a team as a code owner September 6, 2024 17:57
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 6, 2024
**kwargs,
):
args, kwargs = super().convert_args(request, user_id, *args, **kwargs)
fetched_user = kwargs["user"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than deriving the user from the URL, can we derive it from request.user ? That way we're restricted to just the logged in user and limits the chance of cross user queries.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I tried doing that but it doesn't work due to some hybrid cloud stuff, where request.user is a lazy rpc thingy

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #77093       +/-   ##
===========================================
+ Coverage   57.14%   78.18%   +21.03%     
===========================================
  Files        6903     6914       +11     
  Lines      306933   307458      +525     
  Branches    50305    50378       +73     
===========================================
+ Hits       175408   240392    +64984     
+ Misses     126727    60615    -66112     
- Partials     4798     6451     +1653     

Copy link

@geoffg-sentry geoffg-sentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In absense of our ability to derive the user from the request, this looks solid

@schew2381 schew2381 merged commit 5902582 into master Sep 10, 2024
50 checks passed
@schew2381 schew2381 deleted the seiji/fix/prevent-muting-user-alerts branch September 10, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants