mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix: dashboard get by id or slug access filter (#22358)
This commit is contained in:
committed by
GitHub
parent
d6bce09ac3
commit
3761694d72
@@ -87,13 +87,10 @@ def test_post(
|
||||
db.session.commit()
|
||||
|
||||
|
||||
@patch("superset.security.SupersetSecurityManager.raise_for_dashboard_access")
|
||||
def test_post_access_denied(
|
||||
mock_raise_for_dashboard_access, test_client, login_as_admin, dashboard_id: int
|
||||
):
|
||||
mock_raise_for_dashboard_access.side_effect = DashboardAccessDeniedError()
|
||||
def test_post_access_denied(test_client, login_as, dashboard_id: int):
|
||||
login_as("gamma")
|
||||
resp = test_client.post(f"api/v1/dashboard/{dashboard_id}/permalink", json=STATE)
|
||||
assert resp.status_code == 403
|
||||
assert resp.status_code == 404
|
||||
|
||||
|
||||
def test_post_invalid_schema(test_client, login_as_admin, dashboard_id: int):
|
||||
|
||||
Reference in New Issue
Block a user