diff options
author | Gabriel Marks <gabriel.marks@mongodb.com> | 2022-08-30 19:28:35 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-30 21:12:24 +0000 |
commit | 36b8246daa269b1a21d63d3f0e11c31b274e6703 (patch) | |
tree | 121fc5483e0bdd2effb73d6ac5e913761bb43ba6 /src/mongo/db/auth/authorization_manager_impl.cpp | |
parent | 27f7896edc0828d0c4bae3d70bbec7e8b0a66d98 (diff) | |
download | mongo-36b8246daa269b1a21d63d3f0e11c31b274e6703.tar.gz |
SERVER-68342 Modify ServerParameter to take tenantId
Diffstat (limited to 'src/mongo/db/auth/authorization_manager_impl.cpp')
-rw-r--r-- | src/mongo/db/auth/authorization_manager_impl.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mongo/db/auth/authorization_manager_impl.cpp b/src/mongo/db/auth/authorization_manager_impl.cpp index cc86cf0fbc5..db1081b8bf3 100644 --- a/src/mongo/db/auth/authorization_manager_impl.cpp +++ b/src/mongo/db/auth/authorization_manager_impl.cpp @@ -168,9 +168,9 @@ public: } } - Status setFromString(const std::string& str) { + Status setFromString(StringData str) { std::vector<std::string> strList; - str::splitStringDelim(str, &strList, ','); + str::splitStringDelim(str.toString(), &strList, ','); std::vector<UserName> out; for (const auto& nameStr : strList) { @@ -355,16 +355,19 @@ void handleWaitForUserCacheInvalidation(OperationContext* opCtx, const UserHandl int authorizationManagerCacheSize; void AuthorizationManagerPinnedUsersServerParameter::append(OperationContext* opCtx, - BSONObjBuilder& out, - const std::string& name) { - return authorizationManagerPinnedUsers.append(out, name); + BSONObjBuilder* out, + StringData name, + const boost::optional<TenantId>&) { + return authorizationManagerPinnedUsers.append(*out, name.toString()); } -Status AuthorizationManagerPinnedUsersServerParameter::set(const BSONElement& newValue) { +Status AuthorizationManagerPinnedUsersServerParameter::set(const BSONElement& newValue, + const boost::optional<TenantId>&) { return authorizationManagerPinnedUsers.set(newValue); } -Status AuthorizationManagerPinnedUsersServerParameter::setFromString(const std::string& str) { +Status AuthorizationManagerPinnedUsersServerParameter::setFromString( + StringData str, const boost::optional<TenantId>&) { return authorizationManagerPinnedUsers.setFromString(str); } |