michael-s-molina commented on code in PR #34665:
URL: https://github.com/apache/superset/pull/34665#discussion_r2276357009
##########
superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx:
##########
@@ -184,6 +184,7 @@ const SliceHeaderControls = (
props.slice.datasource,
props.dashboardId,
props.formData,
+ !canDrillToDetail,
Review Comment:
I think this should be handled by callers of this hook. The hook's
functionality is to make a fetch request and return the drill info. You
shouldn't call the hook if the required permissions are not there.
```
const datasetResource = canDrillToDetail ? useDatasetDrillInfo(...) :
undefined;
```
Then you can handle the `undefined` `datasetResource`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]