ktmud commented on a change in pull request #12875:
URL: https://github.com/apache/superset/pull/12875#discussion_r569812897
##########
File path: superset/views/core.py
##########
@@ -1785,6 +1786,11 @@ def publish( # pylint: disable=no-self-use
@has_access
@expose("/dashboard/<dashboard_id_or_slug>/")
@event_logger.log_this_with_extra_payload
+ @check_dashboard_access(
+ on_error=lambda self, ex: Response(
+ utils.error_msg_from_exception(ex), status=403
+ )
+ )
Review comment:
Maybe you can do away with the decorator for now to avoid calling
`Dashboard.get` twice, or the decorator could actually update functional
signature to pass the already found `dash` object to the wrapped function.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]