Skip to content

Commit b6bc0f4

Browse files
changes
1 parent 7f1fec5 commit b6bc0f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/compass-collection/src/components/collection-tab.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ function WithErrorBoundary({
118118
function useCollectionTabs(props: CollectionMetadata) {
119119
const pluginTabs = useCollectionSubTabs();
120120
const connectionInfoRef = useConnectionInfoRef();
121-
const isGlobalWritesSupported = useConnectionSupports(
122-
connectionInfoRef.current.id,
123-
'globalWrites'
124-
);
121+
const isGlobalWritesSupported =
122+
useConnectionSupports(connectionInfoRef.current.id, 'globalWrites') &&
123+
!props.isReadonly &&
124+
!['config', 'local', 'admin'].includes(props.namespace.split('.')[0]);
125125
return pluginTabs
126126
.filter((x) => {
127127
if (x.name === 'GlobalWrites' && !isGlobalWritesSupported) {

0 commit comments

Comments
 (0)