diff options
author | Spencer T Brody <spencer@10gen.com> | 2013-12-23 17:38:57 -0500 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2014-01-07 11:40:46 -0500 |
commit | fb925afd65723878fa2911f513f275eada1c8337 (patch) | |
tree | c3e904f3bb5fdc083d280ca6b39147d2646f5c3d /src/mongo/db/auth/role_graph_builtin_roles.cpp | |
parent | 24e5bfbc032512ef36ce641cea547f24df83e434 (diff) | |
download | mongo-fb925afd65723878fa2911f513f275eada1c8337.tar.gz |
SERVER-12119 Add new command to allow applications to append notes to the oplog
Diffstat (limited to 'src/mongo/db/auth/role_graph_builtin_roles.cpp')
-rw-r--r-- | src/mongo/db/auth/role_graph_builtin_roles.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/auth/role_graph_builtin_roles.cpp b/src/mongo/db/auth/role_graph_builtin_roles.cpp index 85f8b33f058..d4c3a9060e1 100644 --- a/src/mongo/db/auth/role_graph_builtin_roles.cpp +++ b/src/mongo/db/auth/role_graph_builtin_roles.cpp @@ -218,6 +218,7 @@ namespace { // clusterManager role actions that target the cluster resource clusterManagerRoleClusterActions + << ActionType::appendOplogNote // backup gets this also << ActionType::applicationMessage // hostManager gets this also << ActionType::replSetConfigure << ActionType::replSetGetStatus // clusterMonitor gets this also @@ -464,9 +465,11 @@ namespace { privileges, Privilege(ResourcePattern::forAnyNormalResource(), ActionType::find)); + ActionSet clusterActions; + clusterActions << ActionType::listDatabases + << ActionType::appendOplogNote; Privilege::addPrivilegeToPrivilegeVector( - privileges, - Privilege(ResourcePattern::forClusterResource(), ActionType::listDatabases)); + privileges, Privilege(ResourcePattern::forClusterResource(), clusterActions)); Privilege::addPrivilegeToPrivilegeVector( privileges, |