File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/compass-collection/src/components Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { connect } from 'react-redux';
33import { type CollectionState , selectTab } from '../modules/collection-tab' ;
44import { css , ErrorBoundary , TabNavBar } from '@mongodb-js/compass-components' ;
55import CollectionHeader from './collection-header' ;
6+ import toNS from 'mongodb-ns' ;
67import { useLogger } from '@mongodb-js/compass-logging/provider' ;
78import {
89 useCollectionQueryBar ,
@@ -118,10 +119,10 @@ function WithErrorBoundary({
118119function useCollectionTabs ( props : CollectionMetadata ) {
119120 const pluginTabs = useCollectionSubTabs ( ) ;
120121 const connectionInfoRef = useConnectionInfoRef ( ) ;
121- const isGlobalWritesSupported = useConnectionSupports (
122- connectionInfoRef . current . id ,
123- 'globalWrites'
124- ) ;
122+ const isGlobalWritesSupported =
123+ useConnectionSupports ( connectionInfoRef . current . id , 'globalWrites' ) &&
124+ ! props . isReadonly &&
125+ ! toNS ( props . namespace ) . specialish ;
125126 return pluginTabs
126127 . filter ( ( x ) => {
127128 if ( x . name === 'GlobalWrites' && ! isGlobalWritesSupported ) {
You can’t perform that action at this time.
0 commit comments