amitmiran137 commented on a change in pull request #12875:
URL: https://github.com/apache/superset/pull/12875#discussion_r570004146
##########
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:
@ktmud look again
I've passed the dashboard queried from the decorator back to the original
func.
we could have a dedicated decorator just for querying the dashboard but I
think that would be an overhead right now
----------------------------------------------------------------
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]