Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Replace 'data-studio' token feature with 'library' (#69040)

Anderson59c9a579f2c0
diff --git a/e2e/test/scenarios/permissions/view-data.cy.spec.js b/e2e/test/scenarios/permissions/view-data.cy.spec.js
index ff60232df81..5f48aa3918c 100644
--- a/e2e/test/scenarios/permissions/view-data.cy.spec.js
+++ b/e2e/test/scenarios/permissions/view-data.cy.spec.js
@@ -607,7 +607,7 @@ describe("scenarios > admin > permissions > view data > sandboxed", () => {
cy.visit(`/admin/permissions/data/database/${SAMPLE_DB_ID}`);
// make sure that we have native permissions now so that we can validate that
- // permissions are droped to query builder only after we sandbox a table
+ // permissions are dropped to query builder only after we sandbox a table
H.modifyPermission(
"All Users",
CREATE_QUERIES_PERM_IDX,
@@ -655,7 +655,7 @@ describe("scenarios > admin > permissions > view data > sandboxed", () => {
"1 million rows",
"Yes",
],
- // expect that the view data permissions has been automatically droped to query builder only
+ // expect that the view data permissions has been automatically dropped to query builder only
[
"All Users",
"Row and column security",
@@ -663,6 +663,7 @@ describe("scenarios > admin > permissions > view data > sandboxed", () => {
"1 million rows",
"No",
],
+ ["Data Analysts", "Blocked", "No", "No", "Yes"],
["collection", "Can view", "No", "1 million rows", "No"],
["data", "Can view", "Query builder and native", "1 million rows", "No"],
["nosql", "Can view", "Query builder only", "1 million rows", "No"],
diff --git a/enterprise/backend/src/metabase_enterprise/api_routes/routes.clj b/enterprise/backend/src/metabase_enterprise/api_routes/routes.clj
index 772bbcb463e..9f6c5ebf8f8 100644
--- a/enterprise/backend/src/metabase_enterprise/api_routes/routes.clj
+++ b/enterprise/backend/src/metabase_enterprise/api_routes/routes.clj
@@ -60,7 +60,7 @@
:audit-app (deferred-tru "Audit app")
:collection-cleanup (deferred-tru "Collection Cleanup")
:content-translation (deferred-tru "Content translation")
- :data-studio (deferred-tru "Data Studio")
+ :library (deferred-tru "Library")
:dependencies (deferred-tru "Dependency Tracking")
:embedding (deferred-tru "Embedding")
:remote-sync (deferred-tru "Remote Sync")
@@ -112,7 +112,7 @@
"/content-translation" (premium-handler metabase-enterprise.content-translation.routes/routes :content-translation)
"/cloud-add-ons" metabase-enterprise.cloud-add-ons.api/routes
"/cloud-proxy" metabase-enterprise.cloud-proxy.api/routes
- "/data-studio" (premium-handler metabase-enterprise.data-studio.api/routes :data-studio)
+ "/data-studio" (premium-handler metabase-enterprise.data-studio.api/routes :library)
"/database-replication" (-> database-replication.api/routes ;; database-replication requires all these features.
(premium-handler :attached-dwh)
(premium-handler :etl-connections)
@@ -125,7 +125,7 @@
"/gsheets" (-> gsheets.api/routes ;; gsheets requires both features.
(premium-handler :attached-dwh)
(premium-handler :etl-connections))
- "/library" (premium-handler metabase-enterprise.library.api/routes :data-studio)
+ "/library" (premium-handler metabase-enterprise.library.api/routes :library)
"/logs" (premium-handler 'metabase-enterprise.advanced-config.api.logs :audit-app)
"/metabot-tools" metabase-enterprise.metabot-v3.tools.api/routes
"/metabot-v3" (premium-handler metabase-enterprise.metabot-v3.api/routes :metabot-v3)
diff --git a/enterprise/backend/src/metabase_enterprise/data_studio/permissions/published_tables.clj b/enterprise/backend/src/metabase_enterprise/data_studio/permissions/published_tables.clj
index 09116074442..9269d39cc1c 100644
--- a/enterprise/backend/src/metabase_enterprise/data_studio/permissions/published_tables.clj
+++ b/enterprise/backend/src/metabase_enterprise/data_studio/permissions/published_tables.clj
@@ -11,7 +11,7 @@
(defenterprise user-published-table-permission
"Returns :query-builder permission if table is published and user has collection access.
Tables published into the root collection (collection_id=nil) are accessible to all users."
- :feature :data-studio
+ :feature :library
[perm-type table-id]
(when (and (= perm-type :perms/create-queries)
(t2/exists? :model/Table
@@ -23,7 +23,7 @@
(defenterprise user-has-any-published-table-permission?
"Returns true if user has access to any published table via collection permissions."
- :feature :data-studio
+ :feature :library
[]
(t2/exists? :model/Table
{:where [:and
@@ -32,7 +32,7 @@
(defenterprise user-has-published-table-permission-for-database?
"Returns true if user has access to any published table in the given database via collection permissions."
- :feature :data-studio
+ :feature :library
[database-id]
(t2/exists? :model/Table
{:where [:and
@@ -42,7 +42,7 @@
(defenterprise can-access-via-collection?
"Returns true if the user can access this published table via collection read permissions."
- :feature :data-studio
+ :feature :library
[table]
(when (:is_published table)
(mi/current-user-has-full-permissions? (perms/perms-objects-set-for-parent-collection table :read))))
diff --git a/enterprise/backend/src/metabase_enterprise/library/validation.clj b/enterprise/backend/src/metabase_enterprise/library/validation.clj
index 869fd27e9bd..3b740d8a535 100644
--- a/enterprise/backend/src/metabase_enterprise/library/validation.clj
+++ b/enterprise/backend/src/metabase_enterprise/library/validation.clj
@@ -8,7 +8,7 @@
(defenterprise check-allowed-content
"Check if the collection's content matches the allowed content.
Throws an exception if it does not"
- :feature :data-studio
+ :feature :library
[content-type collection-id]
(when collection-id
(when-let [collection-type (t2/select-one-fn :type [:model/Collection :type] :id collection-id)]
@@ -23,9 +23,9 @@
true)
(defenterprise check-library-update
- "Checks that a collection of type `:data-studio` only contains allowed content."
+ "Checks that a collection of type `:library` only contains allowed content."
metabase-enterprise.library.validation
- :feature :data-studio
+ :feature :library
[collection]
(when (and (contains? #{collection/library-collection-type
collection/library-data-collection-type
diff --git a/enterprise/backend/test/metabase_enterprise/advanced_permissions/api/group_manager_test.clj b/enterprise/backend/test/metabase_enterprise/advanced_permissions/api/group_manager_test.clj
index a8fc1322670..0b673c997de 100644
--- a/enterprise/backend/test/metabase_enterprise/advanced_permissions/api/group_manager_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/advanced_permissions/api/group_manager_test.clj
@@ -55,7 +55,7 @@
(delete-group :crowberto 204 false)))
(testing "if `advanced-permissions` is enabled"
- (mt/with-premium-features #{:advanced-permissions :data-studio}
+ (mt/with-premium-features #{:advanced-permissions :library}
(testing "still fails if user is not a manager"
(get-groups user 403)
(get-one-group user 403 group)
diff --git a/enterprise/backend/test/metabase_enterprise/advanced_permissions/common_test.clj b/enterprise/backend/test/metabase_enterprise/advanced_permissions/common_test.clj
index f3b79e56747..9dbefab71c8 100644
--- a/enterprise/backend/test/metabase_enterprise/advanced_permissions/common_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/advanced_permissions/common_test.clj
@@ -62,7 +62,7 @@
(deftest current-user-query-permissions-published-table-test
(testing "GET /api/user/current can_create_queries respects published tables"
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(letfn [(user-permissions [user]
(-> (mt/user-http-request user :get 200 "user/current")
:permissions))]
diff --git a/enterprise/backend/test/metabase_enterprise/api/session_test.clj b/enterprise/backend/test/metabase_enterprise/api/session_test.clj
index 7346d1a4f67..fad7387bae2 100644
--- a/enterprise/backend/test/metabase_enterprise/api/session_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/api/session_test.clj
@@ -19,7 +19,7 @@
:dashboard-subscription-filters
:disable-password-login
:database-auth-providers
- :data-studio
+ :library
:development-mode
:email-allow-list
:email-restrict-recipients
@@ -69,7 +69,7 @@
:dashboard_subscription_filters true
:disable_password_login true
:database_auth_providers true
- :data_studio true
+ :library true
:development_mode true
:email_allow_list true
:email_restrict_recipients true
diff --git a/enterprise/backend/test/metabase_enterprise/data_studio/api/collection_test.clj b/enterprise/backend/test/metabase_enterprise/data_studio/api/collection_test.clj
index 7c9cd852f4c..f7425fc048c 100644
--- a/enterprise/backend/test/metabase_enterprise/data_studio/api/collection_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/data_studio/api/collection_test.clj
@@ -9,7 +9,7 @@
[toucan2.core :as t2]))
(deftest collection-items-table-test
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(testing "GET /api/collection/:id/items"
(mt/with-temp [:model/Collection collection {}
:model/Card _ {:collection_id (u/the-id collection)
@@ -51,7 +51,7 @@
(is (= 1 (count (filter #(= "table" (:model %)) (:data items)))))))))))
(deftest collection-items-table-permissions-test
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(testing "GET /api/collection/:id/items - published tables only require collection read permissions"
(mt/with-no-data-perms-for-all-users!
(mt/with-temp [:model/Collection collection {}
diff --git a/enterprise/backend/test/metabase_enterprise/data_studio/api/permissions_groups_test.clj b/enterprise/backend/test/metabase_enterprise/data_studio/api/permissions_groups_test.clj
index eaecf4308f0..5800b93d196 100644
--- a/enterprise/backend/test/metabase_enterprise/data_studio/api/permissions_groups_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/data_studio/api/permissions_groups_test.clj
@@ -9,7 +9,7 @@
(deftest fetch-groups-test
(testing "GET /api/permissions/group - Data Analysts group is visible with the feature"
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:advanced-permissions}
(is (contains? (set (map :id (mt/user-http-request :crowberto :get 200 "permissions/group")))
(:id (perms-group/data-analyst))))))
(testing "GET /api/permissions/group - Data Analysts group is not visible without the feature"
@@ -21,7 +21,7 @@
(deftest sync-data-analyst-group-for-oss!-ee-noop-test
(testing "When we have the feature, sync-data-analyst-group-for-oss! does nothing"
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:advanced-permissions}
(let [data-analyst-group-id (:id (perms-group/data-analyst))]
(mt/with-temp [:model/User {user-id :id} {}]
(perms/add-user-to-group! user-id data-analyst-group-id)
diff --git a/enterprise/backend/test/metabase_enterprise/data_studio/api/query_metadata_test.clj b/enterprise/backend/test/metabase_enterprise/data_studio/api/query_metadata_test.clj
index fa06de24d1c..151dfcb913c 100644
--- a/enterprise/backend/test/metabase_enterprise/data_studio/api/query_metadata_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/data_studio/api/query_metadata_test.clj
@@ -8,7 +8,7 @@
[metabase.util :as u]))
(deftest table-query-metadata-collection-permissions-test
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(testing "GET /api/table/:id/query_metadata"
(testing "Published tables in collections should be accessible with collection read permission (no data permissions)"
(mt/with-temp [:model/Collection coll {}
@@ -57,7 +57,7 @@
(is (= (u/the-id table) (:id response)))))))))))
(deftest table-card-query-metadata-published-table-collection-perms-test
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(testing "GET /api/table/card__:id/query_metadata"
(testing "Should include Field metadata for published tables accessible via collection permissions"
(mt/with-temp [:model/Collection table-coll {}
@@ -77,7 +77,7 @@
(deftest card-query-metadata-published-table-collection-perms-test
(testing "GET /api/card/:id/query_metadata should include published tables accessible via collection permissions"
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-temp [:model/Collection table-coll {}
:model/Database db {}
:model/Table table {:db_id (u/the-id db) :is_published true :collection_id (u/the-id table-coll)}
@@ -103,7 +103,7 @@
(deftest dashboard-query-metadata-published-table-collection-perms-test
(testing "GET /api/dashboard/:id/query_metadata should include published tables accessible via collection permissions"
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-temp [:model/Collection table-coll {}
:model/Database db {}
:model/Table table {:db_id (u/the-id db) :is_published true :collection_id (u/the-id table-coll)}
@@ -132,7 +132,7 @@
(deftest automagic-dashboards-query-metadata-published-table-collection-perms-test
(testing "GET /api/automagic-dashboards/:entity/:entity-id-or-query/query_metadata"
(testing "Should include published tables accessible via collection permissions"
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-temp [:model/Collection table-coll {}
:model/Table table {:is_published true :collection_id (u/the-id table-coll)}
:model/PermissionsGroup custom-group {}
diff --git a/enterprise/backend/test/metabase_enterprise/data_studio/api/table_test.clj b/enterprise/backend/test/metabase_enterprise/data_studio/api/table_test.clj
index e9b45488657..83824af542f 100644
--- a/enterprise/backend/test/metabase_enterprise/data_studio/api/table_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/data_studio/api/table_test.clj
@@ -14,7 +14,7 @@
(use-fixtures :once (fixtures/initialize :db))
(deftest publish-table-test
- (mt/with-premium-features #{:data-studio :audit-app}
+ (mt/with-premium-features #{:library :audit-app}
(without-library
(testing "POST /api/ee/data-studio/table/(un)publish-table"
(testing "publishes tables into the library-data collection"
@@ -69,13 +69,13 @@
(deftest requests-data-studio-feature-flag-test
(mt/with-premium-features #{}
- (is (= "Data Studio is a paid feature not currently available to your instance. Please upgrade to use it. Learn more at metabase.com/upgrade/"
+ (is (= "Library is a paid feature not currently available to your instance. Please upgrade to use it. Learn more at metabase.com/upgrade/"
(:message (mt/user-http-request :crowberto :post 402 "ee/data-studio/table/publish-tables"
{:table_ids [(mt/id :users)]}))))))
(deftest data-analyst-can-access-endpoints-test
- (mt/with-premium-features #{:data-studio}
- (testing "Data analysts (members of Data Analysts group) can access data studio endpoints"
+ (mt/with-premium-features #{:library}
+ (testing "Data analysts (members of Data Analysts group) can access library endpoints"
(let [data-analyst-group-id (:id (perms-group/data-analyst))]
(mt/with-temp [:model/User {analyst-id :id} {:first_name "Data"
:last_name "Analyst"
@@ -93,8 +93,8 @@
{:table_ids [table-id]})))))))))
(deftest regular-user-cannot-access-data-studio-test
- (mt/with-premium-features #{:data-studio}
- (testing "Regular users (not in Data Analysts group) cannot access data studio endpoints"
+ (mt/with-premium-features #{:library}
+ (testing "Regular users (not in Data Analysts group) cannot access library endpoints"
(mt/with-temp [:model/User {user-id :id} {:first_name "Regular"
:last_name "User"
@@ -113,7 +113,7 @@
;;; ------------------------------------------ Publish/Unpublish with Dependencies ------------------------------------------
(deftest publish-tables-with-upstream-dependencies-test
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(testing "POST /api/ee/data-studio/table/publish-tables publishes upstream dependencies"
(mt/with-temp [:model/Collection _ {:type collection/library-data-collection-type}
:model/Database {db-id :id} {}
@@ -140,7 +140,7 @@
orders-id products-id))))))
(deftest publish-tables-recursive-upstream-test
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(testing "POST /api/ee/data-studio/table/publish-tables publishes recursive upstream dependencies"
(mt/with-temp [:model/Collection _ {:type collection/library-data-collection-type}
:model/Database {db-id :id} {}
@@ -178,7 +178,7 @@
items-id orders-id customers-id))))))
(deftest unpublish-tables-with-downstream-dependents-test
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(testing "POST /api/ee/data-studio/table/unpublish-tables unpublishes downstream dependents"
(mt/with-temp [:model/Collection {coll-id :id} {:type collection/library-data-collection-type}
:model/Database {db-id :id} {}
@@ -207,7 +207,7 @@
products-id orders-id))))))
(deftest unpublish-tables-recursive-downstream-test
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(testing "POST /api/ee/data-studio/table/unpublish-tables unpublishes recursive downstream dependents"
(mt/with-temp [:model/Collection {coll-id :id} {:type collection/library-data-collection-type}
:model/Database {db-id :id} {}
diff --git a/enterprise/backend/test/metabase_enterprise/data_studio/permissions/can_read_test.clj b/enterprise/backend/test/metabase_enterprise/data_studio/permissions/can_read_test.clj
index de04247aee3..a9796830865 100644
--- a/enterprise/backend/test/metabase_enterprise/data_studio/permissions/can_read_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/data_studio/permissions/can_read_test.clj
@@ -14,8 +14,8 @@
(use-fixtures :once (fixtures/initialize :db))
(deftest database-can-read-with-published-table-test
- (testing "can-read? for Database considers published table access only with data-studio enabled\n"
- (doseq [features [#{} #{:data-studio}]
+ (testing "can-read? for Database considers published table access only with library enabled\n"
+ (doseq [features [#{} #{:library}]
collection-readable? [false true]
table-is-published? [false true]
view-data [:unrestricted :blocked]]
@@ -49,9 +49,9 @@
#{(perms/collection-read-path collection-id)}
#{}))]
(perms/disable-perms-cache
- ;; Database is readable when: data-studio enabled AND collection readable AND table is published
+ ;; Database is readable when: library enabled AND collection readable AND table is published
;; view-data permission should NOT affect can-read? for Database
- (is (= (and (contains? features :data-studio)
+ (is (= (and (contains? features :library)
collection-readable?
table-is-published?)
(mi/can-read? :model/Database (mt/id))))))))))))))
diff --git a/enterprise/backend/test/metabase_enterprise/data_studio/permissions/published_tables_test.clj b/enterprise/backend/test/metabase_enterprise/data_studio/permissions/published_tables_test.clj
index 1fb36bccf01..e41aeab0100 100644
--- a/enterprise/backend/test/metabase_enterprise/data_studio/permissions/published_tables_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/data_studio/permissions/published_tables_test.clj
@@ -11,7 +11,7 @@
(deftest can-access-via-collection?-returns-false-for-non-published-tables-test
(testing "Returns false for non-published tables"
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-temp [:model/Collection collection {}
:model/PermissionsGroup {group-id :id} {}
:model/User {user-id :id} {}
@@ -23,7 +23,7 @@
(deftest can-access-via-collection?-returns-true-with-collection-access-test
(testing "Returns true for published tables when user has collection access"
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-temp [:model/Collection collection {}
:model/PermissionsGroup {group-id :id} {}
:model/User {user-id :id} {}
@@ -35,7 +35,7 @@
(deftest can-access-via-collection?-returns-false-without-collection-access-test
(testing "Returns false for published tables when user lacks collection access"
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-temp [:model/Collection collection {}
:model/PermissionsGroup {group-id :id} {}
:model/User {user-id :id} {}
diff --git a/enterprise/backend/test/metabase_enterprise/data_studio/permissions/query_test.clj b/enterprise/backend/test/metabase_enterprise/data_studio/permissions/query_test.clj
index e84f3050d06..838f3d99eb4 100644
--- a/enterprise/backend/test/metabase_enterprise/data_studio/permissions/query_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/data_studio/permissions/query_test.clj
@@ -14,8 +14,8 @@
(use-fixtures :once (fixtures/initialize :db))
(deftest published-table-test
- (testing "Published tables grant query access via collection permissions only with data-studio enabled\n"
- (doseq [features [#{} #{:data-studio}]
+ (testing "Published tables grant query access via collection permissions only with library enabled\n"
+ (doseq [features [#{} #{:library}]
collection-readable? [false true]
table-is-published? [false true]
view-data [:unrestricted :blocked]]
@@ -50,15 +50,15 @@
#{(perms/collection-read-path collection-id)}
#{}))]
(perms/disable-perms-cache
- ;; Query is only runnable when: data-studio enabled AND collection readable AND table published AND view-data unrestricted
- (is (= (and (contains? features :data-studio)
+ ;; Query is only runnable when: library enabled AND collection readable AND table published AND view-data unrestricted
+ (is (= (and (contains? features :library)
collection-readable?
table-is-published?
(not= view-data :blocked))
(query-perms/can-run-query? mbql-query))))))))))))))
(deftest published-table-does-not-grant-view-data-test
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(testing "Published tables with collection permissions should NOT grant view-data permissions"
(mt/with-restored-data-perms-for-group! (u/the-id (perms/all-users-group))
(t2/with-transaction [_conn nil {:rollback-only true}]
@@ -92,7 +92,7 @@
(deftest published-table-grants-database-access-test
(mt/with-restored-data-perms-for-group! (u/the-id (perms/all-users-group))
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(testing "POST /api/dataset in EE: published table access GRANTS database access"
(t2/with-transaction [_conn nil {:rollback-only true}]
(mt/with-temp [:model/User {user-id :id} {:email "[email protected]"}
diff --git a/enterprise/backend/test/metabase_enterprise/data_studio/search_test.clj b/enterprise/backend/test/metabase_enterprise/data_studio/search_test.clj
index 268a0407ddb..2ef7a6bc913 100644
--- a/enterprise/backend/test/metabase_enterprise/data_studio/search_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/data_studio/search_test.clj
@@ -9,7 +9,7 @@
[metabase.util.random :refer [random-name]]))
(deftest published-table-collection-filter-test
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(testing "Published tables are included in collection-filtered search"
(mt/with-temp
[:model/Collection {parent-coll :id} {:name "Parent Collection" :location "/"}
diff --git a/enterprise/backend/test/metabase_enterprise/library/api_test.clj b/enterprise/backend/test/metabase_enterprise/library/api_test.clj
index d608aca0361..33960f88252 100644
--- a/enterprise/backend/test/metabase_enterprise/library/api_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/library/api_test.clj
@@ -7,7 +7,7 @@
[toucan2.core :as t2]))
(deftest get-library-test
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-discard-model-updates! [:model/Collection]
(without-library
(testing "When there is no library, returns a message but still 200"
diff --git a/enterprise/backend/test/metabase_enterprise/library/validation_test.clj b/enterprise/backend/test/metabase_enterprise/library/validation_test.clj
index 8dbe9414280..6a157c36cac 100644
--- a/enterprise/backend/test/metabase_enterprise/library/validation_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/library/validation_test.clj
@@ -6,7 +6,7 @@
[toucan2.core :as t2]))
(deftest allowed-content-doesnt-block-regular-collections
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-temp [:model/Collection regular-collection {:name "Regular Collection" :type nil}]
(testing "Regular collections can add anything"
(is (some? (t2/insert! :model/Collection (merge (mt/with-temp-defaults :model/Collection) {:location (str "/" (:id regular-collection) "/")}))))
@@ -15,7 +15,7 @@
(is (some? (t2/insert! :model/Dashboard (merge (mt/with-temp-defaults :model/Dashboard) {:collection_id (:id regular-collection)}))))))))
(deftest library-completely-locked-down
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-temp [:model/Collection no-allowed-content {:name "Test No Content" :type collection/library-collection-type}]
(testing "Cannot add anything to library collections"
(is (thrown-with-msg? clojure.lang.ExceptionInfo #"Cannot add anything to the Library collection"
@@ -28,7 +28,7 @@
(t2/insert! :model/Dashboard (merge (mt/with-temp-defaults :model/Dashboard) {:collection_id (:id no-allowed-content)}))))))))
(deftest check-allowed-content-table
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-temp [:model/Collection allow-tables {:name "Test Base Library" :type collection/library-data-collection-type}]
(testing "Can only add allowed content types"
(mt/with-temp [:model/Table table {:collection_id (:id allow-tables)
@@ -44,7 +44,7 @@
(t2/insert! :model/Dashboard (merge (mt/with-temp-defaults :model/Dashboard) {:collection_id (:id allow-tables)}))))))))
(deftest check-allowed-content-metric
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-temp [:model/Collection allow-metrics {:name "Test Base Library" :type collection/library-metrics-collection-type}]
(testing "Can only add allowed content types"
(mt/with-temp [:model/Card card {:collection_id (:id allow-metrics)
@@ -58,7 +58,7 @@
(t2/insert! :model/Dashboard (merge (mt/with-temp-defaults :model/Dashboard) {:collection_id (:id allow-metrics)}))))))))
(deftest cannot-update-library-collections
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-temp [:model/Collection library {:name "Test Library" :type collection/library-collection-type}
:model/Collection models {:name "Test Semantic Model Layer" :type collection/library-data-collection-type}
:model/Collection metrics {:name "Test Semantic Metrics Layer" :type collection/library-metrics-collection-type}]
diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/LibrarySectionLayout/LibrarySectionLayout.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/LibrarySectionLayout/LibrarySectionLayout.tsx
index 87066e50c94..5465cc8b1f0 100644
--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/LibrarySectionLayout/LibrarySectionLayout.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/LibrarySectionLayout/LibrarySectionLayout.tsx
@@ -91,7 +91,7 @@ function EmptyStateAction({ data, onPublishTable }: EmptyStateActionProps) {
export function LibrarySectionLayout() {
usePageTitle(t`Library`);
- const hasLibraryFeature = useHasTokenFeature("data_studio");
+ const hasLibraryFeature = useHasTokenFeature("library");
if (!hasLibraryFeature) {
return <LibraryUpsellPage />;
diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/index.ts b/enterprise/frontend/src/metabase-enterprise/data-studio/library/index.ts
index c72b05e4104..92d387b1f9d 100644
--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/index.ts
+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/index.ts
@@ -13,8 +13,7 @@ import {
} from "./utils";
export function initializePlugin() {
- if (hasPremiumFeature("data_studio")) {
- // TODO [OSS]: this should be "library" token
+ if (hasPremiumFeature("library")) {
PLUGIN_LIBRARY.isEnabled = true;
PLUGIN_LIBRARY.getDataStudioLibraryRoutes = getDataStudioLibraryRoutes;
PLUGIN_LIBRARY.useGetLibraryCollection = useGetLibraryCollection;
diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/pages/EditSnippetPage/tests/setup.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/pages/EditSnippetPage/tests/setup.tsx
index 50d9ad320e3..4604e6097aa 100644
--- a/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/pages/EditSnippetPage/tests/setup.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/library/snippets/pages/EditSnippetPage/tests/setup.tsx
@@ -62,7 +62,7 @@ export const setup = async ({
export const DEFAULT_EE_SETTINGS: Partial<SetupOps> = {
enterprisePlugins: ["library", "remote_sync"],
tokenFeatures: {
- data_studio: true,
+ library: true,
remote_sync: true,
},
};
diff --git a/enterprise/frontend/src/metabase-enterprise/remote_sync/hooks/use-has-library-dirty-changes.unit.spec.ts b/enterprise/frontend/src/metabase-enterprise/remote_sync/hooks/use-has-library-dirty-changes.unit.spec.ts
index 2c22256a452..362af19436b 100644
--- a/enterprise/frontend/src/metabase-enterprise/remote_sync/hooks/use-has-library-dirty-changes.unit.spec.ts
+++ b/enterprise/frontend/src/metabase-enterprise/remote_sync/hooks/use-has-library-dirty-changes.unit.spec.ts
@@ -79,7 +79,7 @@ const setup = ({
}: SetupOptions = {}) => {
setupEnterprisePlugins();
- const tokenFeatures = createMockTokenFeatures({ data_studio: true });
+ const tokenFeatures = createMockTokenFeatures({ library: true });
const settings = createMockSettings({
"remote-sync-enabled": isGitSyncVisible,
"remote-sync-branch": isGitSyncVisible ? "main" : null,
diff --git a/enterprise/frontend/src/metabase-enterprise/remote_sync/hooks/use-has-transform-dirty-changes.unit.spec.ts b/enterprise/frontend/src/metabase-enterprise/remote_sync/hooks/use-has-transform-dirty-changes.unit.spec.ts
index 8b861505749..6fa5c3d9caa 100644
--- a/enterprise/frontend/src/metabase-enterprise/remote_sync/hooks/use-has-transform-dirty-changes.unit.spec.ts
+++ b/enterprise/frontend/src/metabase-enterprise/remote_sync/hooks/use-has-transform-dirty-changes.unit.spec.ts
@@ -51,7 +51,7 @@ const setup = ({
}: SetupOptions = {}) => {
setupEnterprisePlugins();
- const tokenFeatures = createMockTokenFeatures({ data_studio: true });
+ const tokenFeatures = createMockTokenFeatures({ library: true });
const settings = createMockSettings({
"remote-sync-enabled": isGitSyncVisible,
"remote-sync-branch": isGitSyncVisible ? "main" : null,
diff --git a/frontend/src/metabase-types/api/mocks/settings.ts b/frontend/src/metabase-types/api/mocks/settings.ts
index 8ba51841cbf..617c662572c 100644
--- a/frontend/src/metabase-types/api/mocks/settings.ts
+++ b/frontend/src/metabase-types/api/mocks/settings.ts
@@ -140,7 +140,7 @@ export const createMockTokenFeatures = (
transforms: false,
remote_sync: false,
"transforms-python": false,
- data_studio: false,
+ library: false,
"support-users": false,
tenants: false,
workspaces: false,
diff --git a/frontend/src/metabase-types/api/settings.ts b/frontend/src/metabase-types/api/settings.ts
index 210be5641f7..74023341f40 100644
--- a/frontend/src/metabase-types/api/settings.ts
+++ b/frontend/src/metabase-types/api/settings.ts
@@ -351,7 +351,7 @@ export const tokenFeatures = [
"semantic_search",
"transforms",
"transforms-python",
- "data_studio",
+ "library",
"support-users",
"tenants",
"workspaces",
diff --git a/frontend/src/metabase/common/components/Pickers/EntityPicker/hooks/use-get-path-from-value.unit.spec.tsx b/frontend/src/metabase/common/components/Pickers/EntityPicker/hooks/use-get-path-from-value.unit.spec.tsx
index 766978a42c6..85082ef8e37 100644
--- a/frontend/src/metabase/common/components/Pickers/EntityPicker/hooks/use-get-path-from-value.unit.spec.tsx
+++ b/frontend/src/metabase/common/components/Pickers/EntityPicker/hooks/use-get-path-from-value.unit.spec.tsx
@@ -105,7 +105,7 @@ const setup = ({
}
const enterpriseTokenFeatures = {
- data_studio: true,
+ library: true,
transforms: true,
tenants: true,
};
diff --git a/frontend/src/metabase/common/components/Pickers/MiniPicker/components/MiniPicker/test/ee.unit.spec.tsx b/frontend/src/metabase/common/components/Pickers/MiniPicker/components/MiniPicker/test/ee.unit.spec.tsx
index 21033adc75e..eaa971f96f2 100644
--- a/frontend/src/metabase/common/components/Pickers/MiniPicker/components/MiniPicker/test/ee.unit.spec.tsx
+++ b/frontend/src/metabase/common/components/Pickers/MiniPicker/components/MiniPicker/test/ee.unit.spec.tsx
@@ -41,10 +41,7 @@ describe("library", () => {
collectionItems: [LIBRARY_DATA_COLLECTION, LIBRARY_METRICS_COLLECTION],
});
- setup(
- {},
- { tokenFeatures: createMockTokenFeatures({ data_studio: true }) },
- );
+ setup({}, { tokenFeatures: createMockTokenFeatures({ library: true }) });
expect(await screen.findByText("metrics")).toBeInTheDocument();
expect(await screen.findByText("data")).toBeInTheDocument();
@@ -65,7 +62,7 @@ describe("library", () => {
setup(
{ models: ["dataset", "metric"] },
- { tokenFeatures: createMockTokenFeatures({ data_studio: true }) },
+ { tokenFeatures: createMockTokenFeatures({ library: true }) },
);
expect(await screen.findByText("Our analytics")).toBeInTheDocument();
@@ -93,7 +90,7 @@ describe("library", () => {
setup(
{ models: ["dataset", "metric"] },
- { tokenFeatures: createMockTokenFeatures({ data_studio: true }) },
+ { tokenFeatures: createMockTokenFeatures({ library: true }) },
);
expect(await screen.findByText("Surprise")).toBeInTheDocument();
expect(screen.queryByText("metrics")).not.toBeInTheDocument();
@@ -108,7 +105,7 @@ describe("library", () => {
setup(
{ shouldShowLibrary: false },
- { tokenFeatures: createMockTokenFeatures({ data_studio: true }) },
+ { tokenFeatures: createMockTokenFeatures({ library: true }) },
);
expect(await screen.findByText("Mini Db")).toBeInTheDocument();
diff --git a/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/DataStudioLayout.tsx b/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/DataStudioLayout.tsx
index 3cd19a174bc..7484cccbed2 100644
--- a/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/DataStudioLayout.tsx
+++ b/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/DataStudioLayout.tsx
@@ -98,7 +98,7 @@ function DataStudioNav({ isNavbarOpened, onNavbarToggle }: DataStudioNavProps) {
PLUGIN_REMOTE_SYNC.useHasTransformDirtyChanges();
const [isGitSettingsOpen, setIsGitSettingsOpen] = useState(false);
- const hasLibraryFeature = useHasTokenFeature("data_studio");
+ const hasLibraryFeature = useHasTokenFeature("library");
const hasDependenciesFeature = useHasTokenFeature("dependencies");
const hasRemoteSyncFeature = useHasTokenFeature("remote_sync");
const hasTransformsFeature = useSelector(getTransformsFeatureAvailable);
diff --git a/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/tests/setup.tsx b/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/tests/setup.tsx
index 00766561fd8..5ccdbf93e1a 100644
--- a/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/tests/setup.tsx
+++ b/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/tests/setup.tsx
@@ -235,7 +235,7 @@ export const DEFAULT_EE_SETTINGS: Partial<SetupOpts> = {
tokenFeatures: {
remote_sync: true,
advanced_permissions: true,
- data_studio: true,
+ library: true,
dependencies: true,
},
};
@@ -251,7 +251,7 @@ export const DEFAULT_EE_SETTINGS_WITH_WORKSPACES: Partial<SetupOpts> = {
tokenFeatures: {
remote_sync: true,
advanced_permissions: true,
- data_studio: true,
+ library: true,
dependencies: true,
workspaces: true,
},
diff --git a/frontend/src/metabase/data-studio/data-model/components/TableSection/components/MeasureList/tests/setup.tsx b/frontend/src/metabase/data-studio/data-model/components/TableSection/components/MeasureList/tests/setup.tsx
index f64abc227e1..b8dd15a7a7d 100644
--- a/frontend/src/metabase/data-studio/data-model/components/TableSection/components/MeasureList/tests/setup.tsx
+++ b/frontend/src/metabase/data-studio/data-model/components/TableSection/components/MeasureList/tests/setup.tsx
@@ -46,7 +46,7 @@ export function setup({
"remote-sync-type": remoteSyncType,
"remote-sync-enabled": !!remoteSyncType,
"token-features": createMockTokenFeatures({
- data_studio: true,
+ library: true,
remote_sync: true,
}),
});
diff --git a/frontend/src/metabase/data-studio/data-model/components/TableSection/components/SegmentList/tests/setup.tsx b/frontend/src/metabase/data-studio/data-model/components/TableSection/components/SegmentList/tests/setup.tsx
index 39739664b1a..8812e2eec4f 100644
--- a/frontend/src/metabase/data-studio/data-model/components/TableSection/components/SegmentList/tests/setup.tsx
+++ b/frontend/src/metabase/data-studio/data-model/components/TableSection/components/SegmentList/tests/setup.tsx
@@ -46,7 +46,7 @@ export function setup({
"remote-sync-type": remoteSyncType,
"remote-sync-enabled": !!remoteSyncType,
"token-features": createMockTokenFeatures({
- data_studio: true,
+ library: true,
remote_sync: true,
}),
});
diff --git a/frontend/src/metabase/data-studio/data-model/components/TableSection/tests/enterprise.unit.spec.tsx b/frontend/src/metabase/data-studio/data-model/components/TableSection/tests/enterprise.unit.spec.tsx
index 5ef8a644a7a..1fc3022b286 100644
--- a/frontend/src/metabase/data-studio/data-model/components/TableSection/tests/enterprise.unit.spec.tsx
+++ b/frontend/src/metabase/data-studio/data-model/components/TableSection/tests/enterprise.unit.spec.tsx
@@ -5,7 +5,7 @@ import { type SetupOpts, setup } from "./setup";
describe("TableSection", () => {
const commonSettings: Partial<SetupOpts> = {
enterprisePlugins: ["library", "remote_sync"],
- tokenFeatures: { data_studio: true, remote_sync: true },
+ tokenFeatures: { library: true, remote_sync: true },
};
it("should render publish button for admins", () => {
diff --git a/frontend/src/metabase/data-studio/data-model/pages/DataModel/DataModel.tsx b/frontend/src/metabase/data-studio/data-model/pages/DataModel/DataModel.tsx
index 09a25ac3bb4..388a1c26afd 100644
--- a/frontend/src/metabase/data-studio/data-model/pages/DataModel/DataModel.tsx
+++ b/frontend/src/metabase/data-studio/data-model/pages/DataModel/DataModel.tsx
@@ -113,7 +113,7 @@ function DataModelContent({ params }: Props) {
const parentName = field?.nfc_path?.[0] ?? "";
const parentField = fieldsByName[parentName];
- const hasLibraryFeature = useHasTokenFeature("data_studio");
+ const hasLibraryFeature = useHasTokenFeature("library");
const { data: libraryCollection, isLoading: isLoadingLibrary } =
PLUGIN_LIBRARY.useGetLibraryCollectionQuery(undefined, {
skip: !hasLibraryFeature,
diff --git a/frontend/src/metabase/data-studio/nav/components/NavbarLibrarySection/tests/setup.tsx b/frontend/src/metabase/data-studio/nav/components/NavbarLibrarySection/tests/setup.tsx
index 939cd3a4397..8f4ab0260e8 100644
--- a/frontend/src/metabase/data-studio/nav/components/NavbarLibrarySection/tests/setup.tsx
+++ b/frontend/src/metabase/data-studio/nav/components/NavbarLibrarySection/tests/setup.tsx
@@ -59,7 +59,7 @@ export const setup = ({
"remote-sync-branch": "main",
"remote-sync-type": "read-write",
"token-features": createMockTokenFeatures({
- data_studio: true,
+ library: true,
remote_sync: true,
}),
});
diff --git a/src/metabase/collections_rest/api.clj b/src/metabase/collections_rest/api.clj
index d360ced688b..eb61dfdd846 100644
--- a/src/metabase/collections_rest/api.clj
+++ b/src/metabase/collections_rest/api.clj
@@ -271,8 +271,8 @@
(t2/reducible-query {:select-distinct [:collection_id :type]
:from [:report_card]
:where [:= :archived false]}))
- ;; Tables in collections are an EE feature (data-studio)
- (when (premium-features/has-feature? :data-studio)
+ ;; Tables in collections are an EE feature (library)
+ (when (premium-features/has-feature? :library)
{:table (->> (t2/query {:select-distinct [:collection_id]
:from :metabase_table
:where [:and
@@ -814,9 +814,9 @@
[:= :archived false]
[:in :collection_id descendant-collection-ids]]})))
- ;; Tables in collections are an EE feature (data-studio)
+ ;; Tables in collections are an EE feature (library)
collections-containing-tables
- (if (premium-features/has-feature? :data-studio)
+ (if (premium-features/has-feature? :library)
(->> (when (seq descendant-collection-ids)
(t2/query {:select-distinct [:collection_id]
:from :metabase_table
@@ -1121,8 +1121,8 @@
[{collection-namespace :namespace, :as collection} :- collection/CollectionWithLocationAndIDOrRoot
{:keys [models], :as options} :- CollectionChildrenOptions]
(let [valid-models (for [model-kw (cond-> [:collection :dataset :metric :card :dashboard :pulse :snippet :timeline :document :transform]
- ;; Tables in collections are an EE feature (data-studio)
- (premium-features/has-feature? :data-studio) (conj :table))
+ ;; Tables in collections are an EE feature (library)
+ (premium-features/has-feature? :library) (conj :table))
;; only fetch models that are specified by the `model` param; or everything if it's empty
:when (or (empty? models) (contains? models model-kw))
:let [toucan-model (model-name->toucan-model model-kw)
diff --git a/src/metabase/permissions/models/permissions_group.clj b/src/metabase/permissions/models/permissions_group.clj
index 8e8f9a57218..cc4b6cdbd16 100644
--- a/src/metabase/permissions/models/permissions_group.clj
+++ b/src/metabase/permissions/models/permissions_group.clj
@@ -252,7 +252,7 @@
This is idempotent: if the magic group has no members, nothing happens."
[]
- (when-not (premium-features/enable-data-studio?)
+ (when-not (premium-features/enable-advanced-permissions?)
(when-let [existing-group (t2/select-one :model/PermissionsGroup :magic_group_type data-analyst-magic-group-type)]
(when (pos? (t2/count :model/PermissionsGroupMembership :group_id (:id existing-group)))
(log/info "Converting Data Analysts group to normal group for OSS")
diff --git a/src/metabase/permissions_rest/api.clj b/src/metabase/permissions_rest/api.clj
index 23ec5853564..35c3411f03d 100644
--- a/src/metabase/permissions_rest/api.clj
+++ b/src/metabase/permissions_rest/api.clj
@@ -189,7 +189,7 @@
[:= :is_group_manager true]]}])
(when-not (setting/get :use-tenants)
[:not :is_tenant_group])
- (when-not (premium-features/enable-data-studio?)
+ (when-not (premium-features/enable-advanced-permissions?)
[:or
[:= nil :magic_group_type]
[:not= "data-analyst" :magic_group_type]])]
@@ -301,7 +301,7 @@
:where [:and
[:= :user_id api/*current-user-id*]
[:= :is_group_manager true]]}])
- (not (premium-features/enable-data-studio?))
+ (not (premium-features/enable-advanced-permissions?))
(sql.helpers/where [:not= :group_id (u/the-id (perms/data-analyst-group))])))))
;; TODO (Cam 2025-11-25) please add a response schema to this API endpoint, it makes it easier for our customers to
diff --git a/src/metabase/premium_features/core.clj b/src/metabase/premium_features/core.clj
index 20a9376b24b..ec405d4065f 100644
--- a/src/metabase/premium_features/core.clj
+++ b/src/metabase/premium_features/core.clj
@@ -54,7 +54,7 @@
enable-dashboard-subscription-filters?
enable-database-auth-providers?
enable-database-routing?
- enable-data-studio?
+ enable-library?
enable-dependencies?
enable-email-allow-list?
enable-email-restrict-recipients?
diff --git a/src/metabase/premium_features/settings.clj b/src/metabase/premium_features/settings.clj
index 2db659149ad..be7dbe74658 100644
--- a/src/metabase/premium_features/settings.clj
+++ b/src/metabase/premium_features/settings.clj
@@ -308,9 +308,9 @@
"Should users be allowed to enable support users in-app?"
:support-users)
-(define-premium-feature ^{:added "0.58.0"} enable-data-studio?
- "Should we enable the Data Studio?"
- :data-studio)
+(define-premium-feature ^{:added "0.58.0"} enable-library?
+ "Should we enable the Library?"
+ :library)
(define-premium-feature ^{:added "0.58.0"} enable-tenants?
"Should the multi-tenant feature be enabled?"
@@ -337,7 +337,7 @@
:dashboard_subscription_filters (enable-dashboard-subscription-filters?)
:database_auth_providers (enable-database-auth-providers?)
:database_routing (enable-database-routing?)
- :data_studio (enable-data-studio?)
+ :library (enable-library?)
:dependencies (enable-dependencies?)
:development_mode (development-mode?)
:disable_password_login (can-disable-password-login?)
diff --git a/src/metabase/search/filter.clj b/src/metabase/search/filter.clj
index 17a68fe6a92..c2b0188e6d7 100644
--- a/src/metabase/search/filter.clj
+++ b/src/metabase/search/filter.clj
@@ -91,11 +91,11 @@
(defmethod where-clause* ::collection-hierarchy [_ k v]
;; Filter by collection and all descendants
;; Match items directly in the collection OR in descendant collections
- ;; Tables in collections are an EE feature (data-studio), so exclude them in OSS
+ ;; Tables in collections are an EE feature (library), so exclude them in OSS
(let [collection-filter [:or
[:= k v]
[:like :collection.location (str "%" (collection/location-path v) "%")]]]
- (if (premium-features/has-feature? :data-studio)
+ (if (premium-features/has-feature? :library)
collection-filter
[:and
[:not= :search_index.model [:inline "table"]]
diff --git a/src/metabase/search/in_place/filter.clj b/src/metabase/search/in_place/filter.clj
index 6b835a40e2e..9cd8d6fedf1 100644
--- a/src/metabase/search/in_place/filter.clj
+++ b/src/metabase/search/in_place/filter.clj
@@ -287,8 +287,8 @@
(defmethod build-optional-filter-query [:collection "table"]
[_filter model query collection-id]
- ;; Tables in collections are an EE feature (data-studio)
- (if (premium-features/has-feature? :data-studio)
+ ;; Tables in collections are an EE feature (library)
+ (if (premium-features/has-feature? :library)
(let [collection-col (search.config/column-with-model-alias model :collection_id)
published-col (search.config/column-with-model-alias model :is_published)]
(sql.helpers/where query [:and
diff --git a/test/metabase/analytics/stats_test.clj b/test/metabase/analytics/stats_test.clj
index e32bb1c75f4..35617df3522 100644
--- a/test/metabase/analytics/stats_test.clj
+++ b/test/metabase/analytics/stats_test.clj
@@ -557,7 +557,7 @@
#{:audit-app ;; tracked under :mb-analytics
:collection-cleanup
:development-mode
- :data-studio
+ :library
:embedding
:embedding-sdk
:embedding-simple
diff --git a/test/metabase/collections_rest/api_test.clj b/test/metabase/collections_rest/api_test.clj
index 33beae1809d..26aee8778c9 100644
--- a/test/metabase/collections_rest/api_test.clj
+++ b/test/metabase/collections_rest/api_test.clj
@@ -3385,7 +3385,7 @@
(mt/user-http-request :rasta :delete 403 (str "/collection/" a-id))))))
(deftest published-tables-not-in-collection-items-oss-test
- (testing "In OSS (without :data-studio feature), published tables should NOT appear in collection items"
+ (testing "In OSS (without :library feature), published tables should NOT appear in collection items"
(mt/with-premium-features #{}
(mt/with-temp [:model/Collection {coll-id :id} {:name "Test Collection"}
:model/Card {card-id :id} {:collection_id coll-id :name "Test Card"}
@@ -3400,7 +3400,7 @@
(testing "Published table should NOT appear"
(is (not (some #(= table-id (:id %)) items))
"Published table should NOT be in collection items in OSS"))))))
- (testing "In OSS (without :data-studio feature), published tables should NOT appear in root collection items"
+ (testing "In OSS (without :library feature), published tables should NOT appear in root collection items"
(mt/with-premium-features #{}
(mt/with-temp [:model/Table {table-id :id} {:collection_id nil
:is_published true
diff --git a/test/metabase/transforms/models_test.clj b/test/metabase/transforms/models_test.clj
index 56f4cdb1b37..f5d32c87492 100644
--- a/test/metabase/transforms/models_test.clj
+++ b/test/metabase/transforms/models_test.clj
@@ -275,7 +275,7 @@
"Second hydrated should match the second user's data")))))))
(deftest check-allowed-content-transforms
- (mt/with-premium-features #{:data-studio}
+ (mt/with-premium-features #{:library}
(mt/with-temp [:model/Collection transforms {:name "Test Transforms" :namespace collection/transforms-ns}
:model/Collection regular-col {:name "Test Regular"}]
(mt/with-model-cleanup [:model/Transform :model/Card]