summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/dbcommands.cpp
diff options
context:
space:
mode:
authorjannaerin <golden.janna@gmail.com>2022-08-25 15:30:41 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-25 16:18:39 +0000
commitf08fc26ba70e757df4f5cc1287f0d392964b6b53 (patch)
tree45ee2532b2d9d362c4f237f299cade45713876aa /src/mongo/db/commands/dbcommands.cpp
parent0ead2f7196a757e41bd5b00428519daa2baa4700 (diff)
downloadmongo-f08fc26ba70e757df4f5cc1287f0d392964b6b53.tar.gz
SERVER-67549 Change dropDatabase command path to use DatabaseName
Diffstat (limited to 'src/mongo/db/commands/dbcommands.cpp')
-rw-r--r--src/mongo/db/commands/dbcommands.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/commands/dbcommands.cpp b/src/mongo/db/commands/dbcommands.cpp
index 750a3baac8b..851004bbd28 100644
--- a/src/mongo/db/commands/dbcommands.cpp
+++ b/src/mongo/db/commands/dbcommands.cpp
@@ -123,6 +123,9 @@ public:
bool collectsResourceConsumptionMetrics() const final {
return true;
}
+ bool allowedWithSecurityToken() const final {
+ return true;
+ }
class Invocation final : public InvocationBaseGen {
public:
using InvocationBaseGen::InvocationBaseGen;
@@ -161,8 +164,7 @@ public:
uasserted(5255100, "Have to pass 1 as 'drop' parameter");
}
- // TODO SERVER-67549: pass the DatabaseName object directly.
- Status status = dropDatabase(opCtx, dbName.toStringWithTenantId());
+ Status status = dropDatabase(opCtx, dbName);
if (status != ErrorCodes::NamespaceNotFound) {
uassertStatusOK(status);
}