Skip to content
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

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

calherries
Copy link
Contributor

@calherries calherries commented Apr 17, 2024

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

After:
image

Comment on lines +1168 to +1170
example-dashboard-id 1
example-collection-id 1
expected-sample-db-id 1
Copy link
Contributor Author

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}]
Copy link
Contributor Author

@calherries calherries Apr 17, 2024

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).

@calherries calherries added backport Automatically create PR on current release branch on merge no-backport Do not backport this PR to any branch and removed backport Automatically create PR on current release branch on merge labels Apr 17, 2024
Copy link

replay-io bot commented Apr 17, 2024

Status Complete ↗︎
Commit 95f4889
Results
⚠️ 12 Flaky
2397 Passed

Copy link
Contributor

@crisptrutski crisptrutski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@calherries calherries enabled auto-merge (squash) April 17, 2024 15:11
@calherries calherries merged commit f02b79a into master Apr 18, 2024
232 of 241 checks passed
@calherries calherries deleted the all-users-curate-example-collection branch April 18, 2024 07:28
Copy link

@calherries Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport Do not backport this PR to any branch .Team/BackendComponents also known as BEC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants