summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2021-03-21 22:46:19 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-22 03:34:46 +0000
commit68dbfa5edbb55fec190e508607cf2276367f4f93 (patch)
treee1999ab678707adde4dd7f436dd07c8292cc4970 /src/mongo/db/commands.h
parent393fe9da6a544af2aaea88eda037cfa3eea0da6d (diff)
downloadmongo-68dbfa5edbb55fec190e508607cf2276367f4f93.tar.gz
SERVER-54524 Extend Authorization Session to record all access checks and privilege checks.
Diffstat (limited to 'src/mongo/db/commands.h')
-rw-r--r--src/mongo/db/commands.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h
index cde90bdb297..956033f0379 100644
--- a/src/mongo/db/commands.h
+++ b/src/mongo/db/commands.h
@@ -67,6 +67,7 @@ extern const OperationContext::Decoration<boost::optional<BSONArray>> errorLabel
extern const std::set<std::string> kNoApiVersions;
extern const std::set<std::string> kApiVersions1;
+class AuthorizationContract;
class Command;
class CommandInvocation;
class OperationContext;
@@ -577,6 +578,15 @@ public:
return true;
}
+
+ /**
+ * Get the authorization contract for this command. nullptr means no contract has been
+ * specified.
+ */
+ virtual const AuthorizationContract* getAuthorizationContract() const {
+ return nullptr;
+ }
+
private:
// The full name of the command
const std::string _name;