mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Update http error code from 400 to 403 (#13061)
This commit is contained in:
@@ -766,13 +766,13 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
|
||||
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:
|
||||
@@ -928,7 +928,7 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
|
||||
_("You don't have the rights to ")
|
||||
+ _("alter this ")
|
||||
+ _("dashboard"),
|
||||
status=400,
|
||||
status=403,
|
||||
)
|
||||
|
||||
flash(
|
||||
@@ -946,7 +946,7 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
|
||||
_("You don't have the rights to ")
|
||||
+ _("create a ")
|
||||
+ _("dashboard"),
|
||||
status=400,
|
||||
status=403,
|
||||
)
|
||||
|
||||
dash = Dashboard(
|
||||
|
||||
Reference in New Issue
Block a user