-
Notifications
You must be signed in to change notification settings - Fork 5k
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
adding perm-graph filtering on db or group id #36543
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
escherize
commented
Dec 7, 2023
…e/metabase into bcm-split-data-perm-graph-access
noahmoss
approved these changes
Dec 8, 2023
2 tasks
escherize
commented
Dec 8, 2023
(deftest data-graph-for-db-check-all-dbs-test | ||
(doseq [db-id (t2/select-fn-set :id :model/Database)] | ||
(testing (str "testing data perms graph for db graph with db-id: [" db-id "].") | ||
(= #{db-id} |
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.
missing is
@escherize Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone? |
qnkhuat
pushed a commit
that referenced
this pull request
Dec 12, 2023
* a more refined first crack at adding perm-graph access for db or group id * new routes: filter data-perm-graph on db or group add tests * remove inline defs * code review responses * fix typo * fix the other tests * update the tests to use the right malli schema * reuse private vars in tests * pull graph checker into test util ns and apply it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #36647.
This PR adds 2 endpoints that will make our permission graph api a lot snappier when graphs get large.
api/permissions/graph/db/:db-id
api/permissions/graph/group/:group-id
These return the same graph structure, but filtered such that they return only {db,group}-ids respectively.
Since this is a slice of the entire graph, we query for, post-process, and transmit to the client, much less data.