summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/authorization_manager_impl.cpp
diff options
context:
space:
mode:
authorSara Golemon <sara.golemon@mongodb.com>2020-08-08 19:53:46 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-24 23:19:05 +0000
commitfc279d5cbaa398d879513ae2d679408bfda69e40 (patch)
tree860ffd30730befdf4071284bfb8d6046682e6f3b /src/mongo/db/auth/authorization_manager_impl.cpp
parent5112cd025d54dab920b16bf6ebc901e2d7b4c13e (diff)
downloadmongo-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.cpp11
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);
}