mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix: do not render favorite favStars and filters for anonymous user (#14120)
* fix: do not render favorite favStar and filter for anonymous user * fix: prevent anonymous user to trigger the favstar view route * fix: lint over previous commit * fix: linter follow-up
This commit is contained in:
@@ -148,13 +148,15 @@ export class ExploreChartHeader extends React.PureComponent {
|
||||
|
||||
{this.props.slice && (
|
||||
<StyledButtons>
|
||||
<FaveStar
|
||||
itemId={this.props.slice.slice_id}
|
||||
fetchFaveStar={this.props.actions.fetchFaveStar}
|
||||
saveFaveStar={this.props.actions.saveFaveStar}
|
||||
isStarred={this.props.isStarred}
|
||||
showTooltip
|
||||
/>
|
||||
{this.props.userId && (
|
||||
<FaveStar
|
||||
itemId={this.props.slice.slice_id}
|
||||
fetchFaveStar={this.props.actions.fetchFaveStar}
|
||||
saveFaveStar={this.props.actions.saveFaveStar}
|
||||
isStarred={this.props.isStarred}
|
||||
showTooltip
|
||||
/>
|
||||
)}
|
||||
<PropertiesModal
|
||||
show={this.state.isPropertiesModalOpen}
|
||||
onHide={this.closePropertiesModal}
|
||||
|
||||
@@ -252,6 +252,7 @@ const ExploreChartPanel = props => {
|
||||
form_data={props.form_data}
|
||||
timeout={props.timeout}
|
||||
chart={props.chart}
|
||||
userId={props.userId}
|
||||
/>
|
||||
);
|
||||
|
||||
|
||||
@@ -592,6 +592,7 @@ function mapStateToProps(state) {
|
||||
timeout: explore.common.conf.SUPERSET_WEBSERVER_TIMEOUT,
|
||||
ownState: dataMask[form_data.slice_id]?.ownState,
|
||||
impressionId,
|
||||
userId: explore.user_id,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user