-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Conversation
**kwargs, | ||
): | ||
args, kwargs = super().convert_args(request, user_id, *args, **kwargs) | ||
fetched_user = kwargs["user"] |
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.
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.
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.
ok I tried doing that but it doesn't work due to some hybrid cloud stuff, where request.user is a lazy rpc thingy
Codecov ReportAll 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 |
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.
In absense of our ability to derive the user from the request, this looks solid
No description provided.