diff --git a/frontend/src/metabase/collections/containers/CollectionContent.jsx b/frontend/src/metabase/collections/containers/CollectionContent.jsx index 1c9abca517854cd296b92a8a5f8c5e3be1f745c3..f39657a082f52f4d8bb6f0ea123223fcadbad89b 100644 --- a/frontend/src/metabase/collections/containers/CollectionContent.jsx +++ b/frontend/src/metabase/collections/containers/CollectionContent.jsx @@ -3,10 +3,13 @@ import React, { useState, useCallback } from "react"; import { Box } from "grid-styled"; import _ from "underscore"; import { withRouter } from "react-router"; +import { connect } from "react-redux"; import Collection from "metabase/entities/collections"; import Search from "metabase/entities/search"; +import { getUserIsAdmin } from "metabase/selectors/user"; + import BulkActions from "metabase/collections/components/BulkActions"; import Header from "metabase/collections/components/Header"; import ItemList from "metabase/collections/components/ItemList"; @@ -34,6 +37,12 @@ const getModelsByFilter = filter => { const itemKeyFn = item => `${item.id}:${item.model}`; +function mapStateToProps(state) { + return { + isAdmin: getUserIsAdmin(state), + }; +} + function CollectionContent({ collection, collectionId, @@ -230,5 +239,6 @@ export default _.compose( id: (_, props) => props.collectionId, reload: true, }), + connect(mapStateToProps), withRouter, )(CollectionContent);