diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2020-08-08 19:53:46 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-24 23:19:05 +0000 |
commit | fc279d5cbaa398d879513ae2d679408bfda69e40 (patch) | |
tree | 860ffd30730befdf4071284bfb8d6046682e6f3b /src/mongo/db/auth/authorization_manager_impl.cpp | |
parent | 5112cd025d54dab920b16bf6ebc901e2d7b4c13e (diff) | |
download | mongo-fc279d5cbaa398d879513ae2d679408bfda69e40.tar.gz |
SERVER-50204 Refactor role acquisition using resolveRoles
Diffstat (limited to 'src/mongo/db/auth/authorization_manager_impl.cpp')
-rw-r--r-- | src/mongo/db/auth/authorization_manager_impl.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mongo/db/auth/authorization_manager_impl.cpp b/src/mongo/db/auth/authorization_manager_impl.cpp index 42439d4e791..329b7e4765f 100644 --- a/src/mongo/db/auth/authorization_manager_impl.cpp +++ b/src/mongo/db/auth/authorization_manager_impl.cpp @@ -421,12 +421,9 @@ Status AuthorizationManagerImpl::rolesExist(OperationContext* opCtx, return _externalState->rolesExist(opCtx, roleNames); } -Status AuthorizationManagerImpl::getRoleDescription(OperationContext* opCtx, - const RoleName& roleName, - PrivilegeFormat privileges, - AuthenticationRestrictionsFormat restrictions, - BSONObj* result) { - return _externalState->getRoleDescription(opCtx, roleName, privileges, restrictions, result); +StatusWith<AuthorizationManager::ResolvedRoleData> AuthorizationManagerImpl::resolveRoles( + OperationContext* opCtx, const std::vector<RoleName>& roleNames, ResolveRoleOption option) { + return _externalState->resolveRoles(opCtx, roleNames, option); } Status AuthorizationManagerImpl::getRolesDescription(OperationContext* opCtx, @@ -444,7 +441,7 @@ Status AuthorizationManagerImpl::getRoleDescriptionsForDB( PrivilegeFormat privileges, AuthenticationRestrictionsFormat restrictions, bool showBuiltinRoles, - std::vector<BSONObj>* result) { + BSONArrayBuilder* result) { return _externalState->getRoleDescriptionsForDB( opCtx, dbname, privileges, restrictions, showBuiltinRoles, result); } |