mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
feat: security, user group support (#32121)
This commit is contained in:
committed by
GitHub
parent
fe33661821
commit
15cf06699a
@@ -104,11 +104,13 @@ class TestExportChartsCommand(SupersetTestCase):
|
||||
"query_context": None,
|
||||
}
|
||||
|
||||
@patch("superset.utils.core.g")
|
||||
@patch("superset.security.manager.g")
|
||||
@pytest.mark.usefixtures("load_energy_table_with_slice")
|
||||
def test_export_chart_command_no_access(self, mock_g):
|
||||
def test_export_chart_command_no_access(self, utils_mock_g, manager_mock_g):
|
||||
"""Test that users can't export datasets they don't have access to"""
|
||||
mock_g.user = security_manager.find_user("gamma")
|
||||
manager_mock_g.user = security_manager.find_user("gamma")
|
||||
utils_mock_g.user = manager_mock_g.user
|
||||
|
||||
example_chart = db.session.query(Slice).all()[0]
|
||||
command = ExportChartsCommand([example_chart.id])
|
||||
|
||||
Reference in New Issue
Block a user