-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
[dashboard] fix, enable info endpoint #9015
Conversation
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.
LGTM
Codecov Report
@@ Coverage Diff @@
## master #9015 +/- ##
=======================================
Coverage 59.15% 59.15%
=======================================
Files 367 367
Lines 11682 11682
Branches 2864 2864
=======================================
Hits 6910 6910
Misses 4593 4593
Partials 179 179 Continue to review full report at Codecov.
|
@@ -58,4 +59,4 @@ class RouteMethod: # pylint: disable=too-few-public-methods | |||
# Commonly used sets | |||
CRUD_SET = {ADD, LIST, EDIT, DELETE, ACTION_POST} | |||
RELATED_VIEW_SET = {ADD, LIST, EDIT, DELETE} | |||
REST_MODEL_VIEW_CRUD_SET = {DELETE, GET, GET_LIST, POST, PUT} | |||
REST_MODEL_VIEW_CRUD_SET = {DELETE, GET, GET_LIST, POST, PUT, INFO} |
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.
I'm a little concerned with this pattern overall. Altering these "defaults" down the road could lead to unintended side effects.
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.
We can remove it from the default and enable the info endpoint on a per-case basis. That was the original approach: a5488e2
but it seems like we'll need to info endpoint in most cases
i'm going to merge this to unbreak master. We can make necessary fixes next week. I'm choosing this approach over reverting the API change PR as that one was tagged as a security PR |
* [dashboard] fix, enable info endpoint * add info to REST_MODEL_VIEW_CRUD_SET (cherry picked from commit c552c85)
CATEGORY
Choose one
SUMMARY
The new dashboard list view #8845 depends on the info endpoint to generate filters and check delete/export permissions. It seems it was disabled in the recent work to remove unused routes. This PR re-enabled that endpoint for the rest apis.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
_info
endpoint does not error out on loading the dashboard list view.ADDITIONAL INFORMATION
REVIEWERS
@dpgaspar @mistercrunch