You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/01/02 18:11:25 UTC

[GitHub] [incubator-superset] craig-rueda commented on a change in pull request #8911: [WiP] [dashboard] Fix, prevent delete and update on dashes not owned

craig-rueda commented on a change in pull request #8911: [WiP] [dashboard] Fix, prevent delete and update on dashes not owned
URL: https://github.com/apache/incubator-superset/pull/8911#discussion_r362571534
 
 

 ##########
 File path: superset/views/dashboard/api.py
 ##########
 @@ -26,13 +27,32 @@
 
 import superset.models.core as models
 from superset import appbuilder
-from superset.exceptions import SupersetException
+from superset.exceptions import SupersetException, SupersetSecurityException
 from superset.utils import core as utils
 from superset.views.base import BaseSupersetModelRestApi, BaseSupersetSchema
 
+from ..base import check_ownership
 from .mixin import DashboardMixin
 
 
+def check_owner(f):
 
 Review comment:
   Since this is doing a bit more than just "checking owner" (checks for existence of instances), I think you should name it something like `api_security_wrapper`. We could potentially reuse this in other APIs as well. Otherwise, LGTM.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org