You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by am...@apache.org on 2021/02/13 11:32:53 UTC
[superset] branch master updated: Update http error code from 400
to 403 (#13061)
This is an automated email from the ASF dual-hosted git repository.
amitmiran 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 56fca17 Update http error code from 400 to 403 (#13061)
56fca17 is described below
commit 56fca17e62da8f21d26a93671acb5bc92c659432
Author: Duy Nguyen Hoang <nh...@gmail.com>
AuthorDate: Sat Feb 13 18:32:21 2021 +0700
Update http error code from 400 to 403 (#13061)
---
superset/views/core.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/superset/views/core.py b/superset/views/core.py
index b0ad425..fc87ab4 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -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(