Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { connect } from 'react-redux';
import { type CollectionState, selectTab } from '../modules/collection-tab';
import { css, ErrorBoundary, TabNavBar } from '@mongodb-js/compass-components';
import CollectionHeader from './collection-header';
import toNS from 'mongodb-ns';
import { useLogger } from '@mongodb-js/compass-logging/provider';
import {
useCollectionQueryBar,
Expand Down Expand Up @@ -118,10 +119,10 @@ function WithErrorBoundary({
function useCollectionTabs(props: CollectionMetadata) {
const pluginTabs = useCollectionSubTabs();
const connectionInfoRef = useConnectionInfoRef();
const isGlobalWritesSupported = useConnectionSupports(
connectionInfoRef.current.id,
'globalWrites'
);
const isGlobalWritesSupported =
useConnectionSupports(connectionInfoRef.current.id, 'globalWrites') &&
!props.isReadonly &&
!toNS(props.namespace).specialish;
return pluginTabs
.filter((x) => {
if (x.name === 'GlobalWrites' && !isGlobalWritesSupported) {
Expand Down
Loading