Skip to content

Conversation

@jaylindquist
Copy link

This PR is meant to resolve issue #3498

  • Add Slice permission check for saveas to explore request
  • Add Dashboard permission check for add_to_dash == existing to explore request
  • Add Dashboard permission check for add_to_dash == new to explore request


if action == 'saveas' and not slice_add_perm:
return json_error_response(
"You don't have the rights to create this slice",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You be great to make this translatable using _("Translatable"). Also we're moving away from slice in favor of chart.
To minimize the number of strings to translate you may want to break it into chunks:
_("You don't have the rights to ") + _("create this ") + _("slice")

@mistercrunch
Copy link
Member

Sorry our linter configuration is picky about ' over ".

As a sidenote (may be out-of-scope for this PR) we need to write a solid test suite around accessibility/security. I'll create an issue for it.

@mistercrunch mistercrunch merged commit 54d3875 into apache:master Feb 9, 2018
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
* Add permissions checks for save_or_overwrite_slice

* Change is_owner to check_ownership

* Add translation to chart and dashboard error messages

* Appease the python linter by using single quotes
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* Add permissions checks for save_or_overwrite_slice

* Change is_owner to check_ownership

* Add translation to chart and dashboard error messages

* Appease the python linter by using single quotes
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.23.0 First shipped in 0.23.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.23.0 First shipped in 0.23.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants