summaryrefslogtreecommitdiff
path: root/src/mongo/db/audit.h
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2017-05-20 14:51:35 -0400
committerBenety Goh <benety@mongodb.com>2017-05-25 12:22:29 -0400
commitbb4d304a75271510250419f7a6edfcb62433eb79 (patch)
treedb524b24b339b204564349237fb2904622f9fd72 /src/mongo/db/audit.h
parent41046adf0e53a35f7c2301f12d577476086c6c6d (diff)
downloadmongo-bb4d304a75271510250419f7a6edfcb62433eb79.tar.gz
SERVER-29314 add CommandInterface to break cyclic dependency between Command and audit implementations
Diffstat (limited to 'src/mongo/db/audit.h')
-rw-r--r--src/mongo/db/audit.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/db/audit.h b/src/mongo/db/audit.h
index cbd77c85acf..6fb2b1db998 100644
--- a/src/mongo/db/audit.h
+++ b/src/mongo/db/audit.h
@@ -42,7 +42,7 @@ namespace mongo {
class AuthorizationSession;
class BSONObj;
class Client;
-class Command;
+class CommandInterface;
class NamespaceString;
class OperationContext;
class StringData;
@@ -51,6 +51,12 @@ class UserName;
namespace audit {
/**
+ * Import CommandInterface as Command into the 'audit' namespace to accommodate
+ * implementations of logCommandAuthzCheck() that still refer to Command.
+ */
+using Command = CommandInterface;
+
+/**
* Logs the result of an authentication attempt.
*/
void logAuthentication(Client* client,
@@ -71,7 +77,7 @@ void logAuthentication(Client* client,
void logCommandAuthzCheck(Client* client,
const std::string& dbname,
const BSONObj& cmdObj,
- Command* command,
+ CommandInterface* command,
ErrorCodes::Error result);
/**