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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to