diff options
author | James Wahlin <james.wahlin@10gen.com> | 2016-12-22 17:04:08 -0500 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2016-12-27 09:13:50 -0500 |
commit | 67257272a057635640318842ea05b28e8499f71a (patch) | |
tree | f1b9ffd2b364128a09a35560c19714e4ef582136 /src/mongo/db/auth | |
parent | 46daec6a95628d336762c5f78430f54d361e63c0 (diff) | |
download | mongo-67257272a057635640318842ea05b28e8499f71a.tar.gz |
SERVER-26734 indexStats action is not sufficient for $indexStats
Diffstat (limited to 'src/mongo/db/auth')
-rw-r--r-- | src/mongo/db/auth/authorization_session.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/auth/authorization_session.cpp b/src/mongo/db/auth/authorization_session.cpp index ea70a82907c..fe8e8be3f18 100644 --- a/src/mongo/db/auth/authorization_session.cpp +++ b/src/mongo/db/auth/authorization_session.cpp @@ -261,9 +261,8 @@ Status AuthorizationSession::checkAuthForAggregate(const NamespaceString& ns, PrivilegeVector privileges; if (dps::extractElementAtPath(cmdObj, "pipeline.0.$indexStats")) { - Privilege::addPrivilegeToPrivilegeVector( - &privileges, - Privilege(ResourcePattern::forAnyNormalResource(), ActionType::indexStats)); + Privilege::addPrivilegeToPrivilegeVector(&privileges, + Privilege(inputResource, ActionType::indexStats)); } else if (dps::extractElementAtPath(cmdObj, "pipeline.0.$collStats")) { Privilege::addPrivilegeToPrivilegeVector(&privileges, Privilege(inputResource, ActionType::collStats)); |