diff options
Diffstat (limited to 'src/mongo/db/auth/authorization_session_for_test.cpp')
-rw-r--r-- | src/mongo/db/auth/authorization_session_for_test.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/auth/authorization_session_for_test.cpp b/src/mongo/db/auth/authorization_session_for_test.cpp index e88dd65ebc4..620716c5e4f 100644 --- a/src/mongo/db/auth/authorization_session_for_test.cpp +++ b/src/mongo/db/auth/authorization_session_for_test.cpp @@ -48,8 +48,7 @@ void AuthorizationSessionForTest::assumePrivilegesForDB(Privilege privilege, Str void AuthorizationSessionForTest::assumePrivilegesForDB(PrivilegeVector privileges, StringData dbName) { - UserRequest request(UserName("authorizationSessionForTestUser"_sd, dbName), boost::none); - _authenticatedUser = UserHandle(User(request)); + _authenticatedUser = UserHandle(User(UserName("authorizationSessionForTestUser", dbName))); _authenticatedUser.value()->addPrivileges(privileges); _authenticationMode = AuthorizationSession::AuthenticationMode::kConnection; _updateInternalAuthorizationState(); |