-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support anonymous users in question finder #634
Conversation
Sadly this isUserStaff also throws, on a null value. This can't happen given the if statement, but Java isn't that clever.
However, do not augment results if question statuses are not specified. This makes it possible to use this endpoint for gameboard building without the overhead of loading question attempts.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #634 +/- ##
==========================================
- Coverage 34.40% 34.38% -0.03%
==========================================
Files 514 514
Lines 23101 23109 +8
Branches 2792 2795 +3
==========================================
- Hits 7948 7946 -2
- Misses 14355 14361 +6
- Partials 798 802 +4 ☔ View full report in Codecov by Sentry. |
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.
Looks good.
For your Enum question I'd go with a static method that returns the set.
It was neat, but it did make the code much less clear! Having the static attribute is more efficient than recomputing it each time the method is called, though.
This PR is mostly to add support for anonymous users in question finder augmentation and filtering behaviour.
There are some performance optimisations (don't load the user multiple times, avoid filtering if the filter is equivalent "everything"), and one key behavior change (don't augment results if
statuses
is not specified, which restores the old behaviour useful for the gameboard builder).