summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands.h
diff options
context:
space:
mode:
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;