mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
fix: Allow embedded guest user datasource access with dashboard context (#25081)
This commit is contained in:
@@ -59,6 +59,14 @@ def load_birth_names_dashboard_with_slices_module_scope(load_birth_names_data):
|
||||
_cleanup(dash_id_to_delete, slices_ids_to_delete)
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def load_birth_names_dashboard_with_slices_class_scope(load_birth_names_data):
|
||||
with app.app_context():
|
||||
dash_id_to_delete, slices_ids_to_delete = _create_dashboards()
|
||||
yield
|
||||
_cleanup(dash_id_to_delete, slices_ids_to_delete)
|
||||
|
||||
|
||||
def _create_dashboards():
|
||||
table = _create_table(
|
||||
table_name=BIRTH_NAMES_TBL_NAME,
|
||||
|
||||
@@ -84,6 +84,14 @@ def load_world_bank_dashboard_with_slices_module_scope(load_world_bank_data):
|
||||
_cleanup(dash_id_to_delete, slices_ids_to_delete)
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def load_world_bank_dashboard_with_slices_class_scope(load_world_bank_data):
|
||||
with app.app_context():
|
||||
dash_id_to_delete, slices_ids_to_delete = create_dashboard_for_loaded_data()
|
||||
yield
|
||||
_cleanup(dash_id_to_delete, slices_ids_to_delete)
|
||||
|
||||
|
||||
def create_dashboard_for_loaded_data():
|
||||
with app.app_context():
|
||||
table = create_table_metadata(WB_HEALTH_POPULATION, get_example_database())
|
||||
|
||||
Reference in New Issue
Block a user