fix: RBAC for export for dashboard viewers (#17527)

* set out export

* update test

* use default dataset

* update test

* these test work

* fix test

* update

* fix

* fix test

* make the test better
This commit is contained in:
Hugh A. Miles II
2021-11-25 20:10:41 -08:00
committed by GitHub
parent 7429282972
commit 2e29f36e78
14 changed files with 36 additions and 34 deletions

View File

@@ -378,9 +378,7 @@ class TestDashboardApi(SupersetTestCase, ApiOwnersTestCaseMixin, InsertChartMixi
rv = self.get_assert_metric(uri, "info")
data = json.loads(rv.data.decode("utf-8"))
assert rv.status_code == 200
assert "can_read" in data["permissions"]
assert "can_write" in data["permissions"]
assert len(data["permissions"]) == 2
assert set(data["permissions"]) == {"can_read", "can_write", "can_export"}
@pytest.mark.usefixtures("load_world_bank_dashboard_with_slices")
def test_get_dashboard_not_found(self):