You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/02/08 05:35:05 UTC

[GitHub] mistercrunch commented on a change in pull request #4346: Add permission checks to save_or_overwrite_slice

mistercrunch commented on a change in pull request #4346: Add permission checks to save_or_overwrite_slice
URL: https://github.com/apache/incubator-superset/pull/4346#discussion_r166836344
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -1182,6 +1182,11 @@ def explore(self, datasource_type, datasource_id):
                 "You don't have the rights to alter this slice",
                 status=400)
 
+        if action == 'saveas' and not slice_add_perm:
+            return json_error_response(
+                "You don't have the rights to create this slice",
 
 Review comment:
   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")
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services