diff options
author | Spencer T Brody <spencer@mongodb.com> | 2015-12-07 16:56:11 -0500 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2015-12-09 11:18:31 -0500 |
commit | 13270a048515916324c5f44958c225550d5c4dc9 (patch) | |
tree | 18ff49d60cc1ea159329bb122d28bd8762ac5382 /src/mongo/db/auth/action_set.h | |
parent | 1c936e91a124e44d1925a15bf0e207dc4f7942a1 (diff) | |
download | mongo-13270a048515916324c5f44958c225550d5c4dc9.tar.gz |
SERVER-21535 Make mongos ignore unrecognized actions during privilege parsing while authenticating users
Diffstat (limited to 'src/mongo/db/auth/action_set.h')
-rw-r--r-- | src/mongo/db/auth/action_set.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/auth/action_set.h b/src/mongo/db/auth/action_set.h index 339a68f019c..d78b70879fe 100644 --- a/src/mongo/db/auth/action_set.h +++ b/src/mongo/db/auth/action_set.h @@ -79,10 +79,13 @@ public: // an int bitmask of the actions. static Status parseActionSetFromString(const std::string& actionsString, ActionSet* result); - // Takes a vector of action type std::string representations and returns an ActionSet of the - // actions. + // Takes a vector of action type std::string representations and writes into *result an + // ActionSet of all valid actions encountered. + // If it encounters any actions that it doesn't recognize, will put those into + // *unrecognizedActions, while still returning the valid actions in *result, and returning OK. static Status parseActionSetFromStringVector(const std::vector<std::string>& actionsVector, - ActionSet* result); + ActionSet* result, + std::vector<std::string>* unrecognizedActions); private: // bitmask of actions this privilege grants |