diff options
Diffstat (limited to 'src/mongo/db/auth/authorization_session.cpp')
-rw-r--r-- | src/mongo/db/auth/authorization_session.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/auth/authorization_session.cpp b/src/mongo/db/auth/authorization_session.cpp index 8d990765552..6b3e0800c2f 100644 --- a/src/mongo/db/auth/authorization_session.cpp +++ b/src/mongo/db/auth/authorization_session.cpp @@ -209,6 +209,10 @@ User* AuthorizationSession::getSingleUser() { return lookupUser(userName); } +bool AuthorizationSession::isAuthenticated() { + return _authenticatedUsers.begin() != _authenticatedUsers.end(); +} + void AuthorizationSession::logoutDatabase(const std::string& dbname) { User* removedUser = _authenticatedUsers.removeByDBName(dbname); if (removedUser) { |