diff options
author | Spencer Jackson <spencer.jackson@mongodb.com> | 2017-08-01 11:03:25 -0400 |
---|---|---|
committer | Spencer Jackson <spencer.jackson@mongodb.com> | 2017-08-01 11:32:36 -0400 |
commit | ecfc54c1bcc110b95c6f5dfd71e99f27bcbafea3 (patch) | |
tree | df07a25d4fa13b0fabc22d0c97de53bc200dd6b5 /src/mongo | |
parent | 3394652848101167fdc16e30e98f99ea9c57c3f4 (diff) | |
download | mongo-ecfc54c1bcc110b95c6f5dfd71e99f27bcbafea3.tar.gz |
SERVER-29182: Ensure propagation of user ID in usersInfo
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/commands/user_management_commands.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/db/commands/user_management_commands.cpp b/src/mongo/db/commands/user_management_commands.cpp index 4e77d630159..65a9ffd3164 100644 --- a/src/mongo/db/commands/user_management_commands.cpp +++ b/src/mongo/db/commands/user_management_commands.cpp @@ -1231,11 +1231,9 @@ public: // to be stripped out BSONObjBuilder strippedUser(usersArrayBuilder.subobjStart()); for (const BSONElement& e : userDetails) { - if (!args.showCredentials && e.fieldNameStringData() == "credentials") { - continue; - } - - if (e.fieldNameStringData() == AuthorizationManager::USER_ID_FIELD_NAME) { + if (!args.showCredentials && + (e.fieldNameStringData() == "credentials" || + e.fieldNameStringData() == AuthorizationManager::USER_ID_FIELD_NAME)) { continue; } |