diff --git a/superset/views/core.py b/superset/views/core.py index cf0ca7d4dddd5..e2ba393b24c27 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -764,13 +764,13 @@ def explore( # pylint: disable=too-many-locals,too-many-return-statements if action == "overwrite" and not slice_overwrite_perm: return json_error_response( _("You don't have the rights to ") + _("alter this ") + _("chart"), - status=400, + status=403, ) if action == "saveas" and not slice_add_perm: return json_error_response( _("You don't have the rights to ") + _("create a ") + _("chart"), - status=400, + status=403, ) if action in ("saveas", "overwrite") and datasource: @@ -929,7 +929,7 @@ def save_or_overwrite_slice( _("You don't have the rights to ") + _("alter this ") + _("dashboard"), - status=400, + status=403, ) flash( @@ -947,7 +947,7 @@ def save_or_overwrite_slice( _("You don't have the rights to ") + _("create a ") + _("dashboard"), - status=400, + status=403, ) dash = Dashboard(