You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2024/02/15 21:26:40 UTC
(superset) branch master updated: fix: Plain error message when visiting a dashboard via permalink without permissions (#27132)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new acb2d1d6b4 fix: Plain error message when visiting a dashboard via permalink without permissions (#27132)
acb2d1d6b4 is described below
commit acb2d1d6b4f26a9dfe2957970889af3950ec4084
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Thu Feb 15 16:26:33 2024 -0500
fix: Plain error message when visiting a dashboard via permalink without permissions (#27132)
---
superset/views/core.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/superset/views/core.py b/superset/views/core.py
index c8336521fc..cc349d9f32 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -46,6 +46,7 @@ from superset import (
from superset.async_events.async_query_manager import AsyncQueryTokenException
from superset.commands.chart.exceptions import ChartNotFoundError
from superset.commands.chart.warm_up_cache import ChartWarmUpCacheCommand
+from superset.commands.dashboard.exceptions import DashboardAccessDeniedError
from superset.commands.dashboard.permalink.get import GetDashboardPermalinkCommand
from superset.commands.dataset.exceptions import DatasetNotFoundError
from superset.commands.explore.form_data.create import CreateFormDataCommand
@@ -832,6 +833,9 @@ class Superset(BaseSupersetView):
except DashboardPermalinkGetFailedError as ex:
flash(__("Error: %(msg)s", msg=ex.message), "danger")
return redirect("/dashboard/list/")
+ except DashboardAccessDeniedError as ex:
+ flash(__("Error: %(msg)s", msg=ex.message), "danger")
+ return redirect("/dashboard/list/")
if not value:
return json_error_response(_("permalink state not found"), status=404)
dashboard_id, state = value["dashboardId"], value.get("state", {})