summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth
diff options
context:
space:
mode:
authorAmalia Hawkins <amalia.hawkins@10gen.com>2014-04-28 16:29:47 -0400
committerAmalia Hawkins <amalia.hawkins@10gen.com>2014-04-28 17:01:28 -0400
commit24aeb8515961f9dc493addee39ee2d2c78254d90 (patch)
treea2b137a0ee4f14df53b80adb42e99447715ea287 /src/mongo/db/auth
parentb01f5a4153638047b7cebb5c60abf32195836ce1 (diff)
downloadmongo-24aeb8515961f9dc493addee39ee2d2c78254d90.tar.gz
SERVER-13727 add collStats permission to builtin backup role
Diffstat (limited to 'src/mongo/db/auth')
-rw-r--r--src/mongo/db/auth/role_graph_builtin_roles.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/auth/role_graph_builtin_roles.cpp b/src/mongo/db/auth/role_graph_builtin_roles.cpp
index ddddb8d42a8..f1a78c0fde8 100644
--- a/src/mongo/db/auth/role_graph_builtin_roles.cpp
+++ b/src/mongo/db/auth/role_graph_builtin_roles.cpp
@@ -466,9 +466,12 @@ namespace {
}
void addBackupPrivileges(PrivilegeVector* privileges) {
+ ActionSet normalResourceActions;
+ normalResourceActions << ActionType::find
+ << ActionType::collStats;
Privilege::addPrivilegeToPrivilegeVector(
privileges,
- Privilege(ResourcePattern::forAnyNormalResource(), ActionType::find));
+ Privilege(ResourcePattern::forAnyNormalResource(), normalResourceActions));
ActionSet clusterActions;
clusterActions << ActionType::getParameter // To check authSchemaVersion