summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/impersonation_session.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/auth/impersonation_session.h')
-rw-r--r--src/mongo/db/auth/impersonation_session.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/mongo/db/auth/impersonation_session.h b/src/mongo/db/auth/impersonation_session.h
index ab05bf1e5c3..af2dab2f774 100644
--- a/src/mongo/db/auth/impersonation_session.h
+++ b/src/mongo/db/auth/impersonation_session.h
@@ -29,20 +29,22 @@
#include "mongo/base/disallow_copying.h"
namespace mongo {
- class OperationContext;
+class OperationContext;
- /**
- * RAII class to optionally set an impersonated username list into the authorization session
- * for the duration of the life of this object.
- */
- class ImpersonationSessionGuard {
- MONGO_DISALLOW_COPYING(ImpersonationSessionGuard);
- public:
- ImpersonationSessionGuard(OperationContext* txn);
- ~ImpersonationSessionGuard();
- private:
- OperationContext* _txn;
- bool _active{false};
- };
+/**
+ * RAII class to optionally set an impersonated username list into the authorization session
+ * for the duration of the life of this object.
+ */
+class ImpersonationSessionGuard {
+ MONGO_DISALLOW_COPYING(ImpersonationSessionGuard);
+
+public:
+ ImpersonationSessionGuard(OperationContext* txn);
+ ~ImpersonationSessionGuard();
+
+private:
+ OperationContext* _txn;
+ bool _active{false};
+};
} // namespace mongo