-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add curate permissions for "All Users" for example collection #41512
Conversation
example-dashboard-id 1 | ||
example-collection-id 1 | ||
expected-sample-db-id 1 |
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 just re-ordered these to be at the top, and added example-collection-id
_ (t2/query {:insert-into :metabase_database :values dbs}) | ||
db-ids (set (map :id (t2/query {:select :id :from :metabase_database}))) | ||
example-dashboard-id 1 | ||
expected-db-ids #{example-dashboard-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.
This was a logical bug to use example-dashboard-id
but I got away with it because it is the same as the expected DB ID (both are 1).
|
62778f9
to
95f4889
Compare
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
@calherries Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone? |
This PR adds "curate" permissions for "All Users" for example collection added in #40753. Previously only Admins had access. I decided to implement it in Clojure and not by adding more data to
resources/sample-content.edn
, because if we want to export another collection in the future the separation of content and permissions will make that process simpler.Before:
![image](https://private-user-images.githubusercontent.com/39073188/323215669-a3a72483-3319-4c8d-84db-c21635a11b46.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4OTQ0MjEsIm5iZiI6MTcxOTg5NDEyMSwicGF0aCI6Ii8zOTA3MzE4OC8zMjMyMTU2NjktYTNhNzI0ODMtMzMxOS00YzhkLTg0ZGItYzIxNjM1YTExYjQ2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1IT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