summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/list_collections.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/list_collections.cpp')
-rw-r--r--src/mongo/db/commands/list_collections.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/commands/list_collections.cpp b/src/mongo/db/commands/list_collections.cpp
index bc144913d4f..093ff11a439 100644
--- a/src/mongo/db/commands/list_collections.cpp
+++ b/src/mongo/db/commands/list_collections.cpp
@@ -239,7 +239,7 @@ BSONObj buildCollectionBson(OperationContext* opCtx,
b.append("options", options.toBSON(false));
BSONObjBuilder infoBuilder;
- infoBuilder.append("readOnly", storageGlobalParams.readOnly);
+ infoBuilder.append("readOnly", opCtx->readOnly());
if (options.uuid)
infoBuilder.appendElements(options.uuid->toBSON());
b.append("info", infoBuilder.obj());