summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/authorization_session_impl.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2021-04-07 09:49:49 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-04-07 14:18:03 +0000
commitbb6b69cd9223649aa27d67cd9a157e7e199e0f03 (patch)
tree8d7c39a2719aeab3c17abc73b21908b768be5e8c /src/mongo/db/auth/authorization_session_impl.h
parent8cdac63ac18aa2e852d7450885fef71113ff0464 (diff)
downloadmongo-bb6b69cd9223649aa27d67cd9a157e7e199e0f03.tar.gz
SERVER-55801 Fix Authorization Contract state tracking during setFCV
Diffstat (limited to 'src/mongo/db/auth/authorization_session_impl.h')
-rw-r--r--src/mongo/db/auth/authorization_session_impl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/auth/authorization_session_impl.h b/src/mongo/db/auth/authorization_session_impl.h
index 8887a06fc4b..19c90b97f74 100644
--- a/src/mongo/db/auth/authorization_session_impl.h
+++ b/src/mongo/db/auth/authorization_session_impl.h
@@ -202,5 +202,12 @@ private:
// of authorization checks they perform. After a command completes running, MongoDB verifies the
// set of checks performed is a subset of the checks declared in the contract.
AuthorizationContract _contract;
+
+ // Contract checking is feature guarded. As such we may decide at the start of command to not
+ // track it but reach a different decision after the command has been run because the FCV has
+ // changed. We must record our first decision.
+ //
+ // TODO SERVER-52364 - remove this variable after the feature flag is removed.
+ bool _checkContracts;
};
} // namespace mongo